Exemple #1
0
 private static ca a(RemoteInput remoteInput, cb cbVar) {
   return cbVar.b(
       remoteInput.getResultKey(),
       remoteInput.getLabel(),
       remoteInput.getChoices(),
       remoteInput.getAllowFreeFormInput(),
       remoteInput.getExtras());
 }
 /**
  * Populate an intent object with the results gathered from remote input. This method should only
  * be called by remote input collection services when sending results to a pending intent.
  *
  * @param remoteInputs The remote inputs for which results are being provided
  * @param intent The intent to add remote inputs to. The {@link ClipData} field of the intent will
  *     be modified to contain the results.
  * @param results A bundle holding the remote input results. This bundle should be populated with
  *     keys matching the result keys specified in {@code remoteInputs} with values being the
  *     result per key.
  */
 public static void addResultsToIntent(RemoteInput[] remoteInputs, Intent intent, Bundle results) {
   Bundle resultsBundle = new Bundle();
   for (RemoteInput remoteInput : remoteInputs) {
     Object result = results.get(remoteInput.getResultKey());
     if (result instanceof CharSequence) {
       resultsBundle.putCharSequence(remoteInput.getResultKey(), (CharSequence) result);
     }
   }
   Intent clipIntent = new Intent();
   clipIntent.putExtra(EXTRA_RESULTS_DATA, resultsBundle);
   intent.setClipData(ClipData.newIntent(RESULTS_CLIP_LABEL, clipIntent));
 }
 private static NotificationCompatBase.Action getActionCompatFromAction(
     Notification.Action paramAction,
     NotificationCompatBase.Action.Factory paramFactory,
     RemoteInputCompatBase.RemoteInput.Factory paramFactory1) {
   RemoteInput[] arrayOfRemoteInput1 = paramAction.getRemoteInputs();
   if (arrayOfRemoteInput1 == null) {}
   RemoteInputCompatBase.RemoteInput[] arrayOfRemoteInput;
   for (paramFactory1 = null; ; paramFactory1 = arrayOfRemoteInput) {
     return paramFactory.build(icon, title, actionIntent, paramAction.getExtras(), paramFactory1);
     arrayOfRemoteInput = paramFactory1.newArray(arrayOfRemoteInput1.length);
     int i = 0;
     while (i < arrayOfRemoteInput1.length) {
       RemoteInput localRemoteInput = arrayOfRemoteInput1[i];
       arrayOfRemoteInput[i] =
           paramFactory1.build(
               localRemoteInput.getResultKey(),
               localRemoteInput.getLabel(),
               localRemoteInput.getChoices(),
               localRemoteInput.getAllowFreeFormInput(),
               localRemoteInput.getExtras());
       i += 1;
     }
   }
 }
Exemple #4
0
 public final Bundle getResultsFromIntent(Intent paramIntent) {
   return RemoteInput.getResultsFromIntent(paramIntent);
 }