cw.java 2.93 KB
import android.annotation.TargetApi;
import android.content.ClipData;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.RequiresApi;
import android.support.v4.app.RemoteInputCompatBase.RemoteInput;
import android.support.v4.app.RemoteInputCompatBase.RemoteInput.Factory;

@TargetApi(16)
@RequiresApi(16)
public final class cw
{
  public static void a(RemoteInputCompatBase.RemoteInput[] paramArrayOfRemoteInput, Intent paramIntent, Bundle paramBundle)
  {
    Bundle localBundle = new Bundle();
    int j = paramArrayOfRemoteInput.length;
    int i = 0;
    while (i < j)
    {
      RemoteInputCompatBase.RemoteInput localRemoteInput = paramArrayOfRemoteInput[i];
      Object localObject = paramBundle.get(localRemoteInput.getResultKey());
      if ((localObject instanceof CharSequence)) {
        localBundle.putCharSequence(localRemoteInput.getResultKey(), (CharSequence)localObject);
      }
      i += 1;
    }
    paramArrayOfRemoteInput = new Intent();
    paramArrayOfRemoteInput.putExtra("android.remoteinput.resultsData", localBundle);
    paramIntent.setClipData(ClipData.newIntent("android.remoteinput.results", paramArrayOfRemoteInput));
  }
  
  public static Bundle[] a(RemoteInputCompatBase.RemoteInput[] paramArrayOfRemoteInput)
  {
    if (paramArrayOfRemoteInput == null) {
      return null;
    }
    Bundle[] arrayOfBundle = new Bundle[paramArrayOfRemoteInput.length];
    int i = 0;
    while (i < paramArrayOfRemoteInput.length)
    {
      RemoteInputCompatBase.RemoteInput localRemoteInput = paramArrayOfRemoteInput[i];
      Bundle localBundle = new Bundle();
      localBundle.putString("resultKey", localRemoteInput.getResultKey());
      localBundle.putCharSequence("label", localRemoteInput.getLabel());
      localBundle.putCharSequenceArray("choices", localRemoteInput.getChoices());
      localBundle.putBoolean("allowFreeFormInput", localRemoteInput.getAllowFreeFormInput());
      localBundle.putBundle("extras", localRemoteInput.getExtras());
      arrayOfBundle[i] = localBundle;
      i += 1;
    }
    return arrayOfBundle;
  }
  
  public static RemoteInputCompatBase.RemoteInput[] a(Bundle[] paramArrayOfBundle, RemoteInputCompatBase.RemoteInput.Factory paramFactory)
  {
    if (paramArrayOfBundle == null) {
      return null;
    }
    RemoteInputCompatBase.RemoteInput[] arrayOfRemoteInput = paramFactory.newArray(paramArrayOfBundle.length);
    int i = 0;
    while (i < paramArrayOfBundle.length)
    {
      Bundle localBundle = paramArrayOfBundle[i];
      arrayOfRemoteInput[i] = paramFactory.build(localBundle.getString("resultKey"), localBundle.getCharSequence("label"), localBundle.getCharSequenceArray("choices"), localBundle.getBoolean("allowFreeFormInput"), localBundle.getBundle("extras"));
      i += 1;
    }
    return arrayOfRemoteInput;
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/cw.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */