Home
last modified time | relevance | path

Searched refs:pendingIntent (Results 1 – 25 of 28) sorted by relevance

12

/external/robolectric/robolectric/src/test/java/org/robolectric/shadows/
DShadowPendingIntentTest.java51 PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 99, intent, 0); in getBroadcast_shouldCreateIntentForBroadcast() local
53 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getBroadcast_shouldCreateIntentForBroadcast()
70 PendingIntent pendingIntent = PendingIntent.getActivity(context, 99, intent, 0, bundle); in getActivity_withBundle_shouldCreateIntentForBroadcast() local
72 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getActivity_withBundle_shouldCreateIntentForBroadcast()
88 PendingIntent pendingIntent = PendingIntent.getActivities(context, 99, intents, 0); in getActivities_shouldCreateIntentForBroadcast() local
90 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getActivities_shouldCreateIntentForBroadcast()
93 pendingIntent.send(); in getActivities_shouldCreateIntentForBroadcast()
106 PendingIntent pendingIntent = PendingIntent.getActivities(context, 99, intents, 0, bundle); in getActivities_withBundle_shouldCreateIntentForBroadcast() local
108 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getActivities_withBundle_shouldCreateIntentForBroadcast()
111 pendingIntent.send(); in getActivities_withBundle_shouldCreateIntentForBroadcast()
[all …]
DShadowBluetoothLeScannerTest.java37 private PendingIntent pendingIntent; field in ShadowBluetoothLeScannerTest
72 pendingIntent = in setUp()
105 bluetoothLeScanner.startScan(scanFilters, scanSettings, pendingIntent); in startScanning_forPendingIntent()
106 assertThat(shadowOf(bluetoothLeScanner).getActiveScans().get(0).pendingIntent()) in startScanning_forPendingIntent()
107 .isEqualTo(pendingIntent); in startScanning_forPendingIntent()
113 bluetoothLeScanner.startScan(null, null, pendingIntent); in startScanning_forPendingIntent_withNullParameters()
114 assertThat(shadowOf(bluetoothLeScanner).getActiveScans().get(0).pendingIntent()) in startScanning_forPendingIntent_withNullParameters()
115 .isEqualTo(pendingIntent); in startScanning_forPendingIntent_withNullParameters()
121 bluetoothLeScanner.startScan(scanFilters, scanSettings, pendingIntent); in stopScanning_forPendingIntent()
122 assertThat(shadowOf(bluetoothLeScanner).getActiveScans().get(0).pendingIntent()) in stopScanning_forPendingIntent()
[all …]
DShadowLocationManagerTest.java407 locationManager.requestLocationUpdates(GPS_PROVIDER, 0, 0, gpsListener.pendingIntent); in testSetProviderEnabled_Listeners()
754 locationManager.requestSingleUpdate(GPS_PROVIDER, gpsListener.pendingIntent); in testRequestSingleUpdate_Provider_PendingIntent()
755 locationManager.requestSingleUpdate(MY_PROVIDER, myListener.pendingIntent); in testRequestSingleUpdate_Provider_PendingIntent()
756 locationManager.requestSingleUpdate(PASSIVE_PROVIDER, passiveListener.pendingIntent); in testRequestSingleUpdate_Provider_PendingIntent()
844 locationManager.requestLocationUpdates(NETWORK_PROVIDER, 0, 0, networkListener.pendingIntent); in testRequestLocationUpdates_Provider_PendingIntent()
845 locationManager.requestLocationUpdates(PASSIVE_PROVIDER, 0, 0, passiveListener.pendingIntent); in testRequestLocationUpdates_Provider_PendingIntent()
849 locationManager.removeUpdates(networkListener.pendingIntent); in testRequestLocationUpdates_Provider_PendingIntent()
851 locationManager.removeUpdates(passiveListener.pendingIntent); in testRequestLocationUpdates_Provider_PendingIntent()
892 locationManager.requestLocationUpdates(0, 0, gps, gpsReceiver.pendingIntent); in testRequestLocationUpdates_Criteria_PendingIntent()
895 locationManager.removeUpdates(gpsReceiver.pendingIntent); in testRequestLocationUpdates_Criteria_PendingIntent()
[all …]
DShadowAmbientContextManagerTest.java53 PendingIntent pendingIntent = in registerObserver_shouldStoreLastRequest() local
59 pendingIntent, in registerObserver_shouldStoreLastRequest()
80 PendingIntent pendingIntent = in registerObserver_thenUnregister_shouldClearLastRequest() local
85 pendingIntent, in registerObserver_thenUnregister_shouldClearLastRequest()
111 PendingIntent pendingIntent = in registerObserver_statusSetToSuccess_shouldNotifyConsumerWithStoredStatus() local
117 request, pendingIntent, MoreExecutors.directExecutor(), statusFuture::set); in registerObserver_statusSetToSuccess_shouldNotifyConsumerWithStoredStatus()
DShadowNotificationTest.java18 PendingIntent pendingIntent = PendingIntent.getActivity(getApplication(), 0, new Intent(), 0); in setLatestEventInfo__shouldCaptureContentIntent() local
20 notification.setLatestEventInfo(getApplication(), "title", "content", pendingIntent); in setLatestEventInfo__shouldCaptureContentIntent() local
21 assertThat(notification.contentIntent).isSameInstanceAs(pendingIntent); in setLatestEventInfo__shouldCaptureContentIntent()
DShadowAlarmManagerTest.java676 @Nullable private PendingIntent pendingIntent; field in ShadowAlarmManagerTest.TestBroadcastListener
684 pendingIntent = PendingIntent.getBroadcast(context, 0, new Intent(action), 0); in register()
690 return Objects.requireNonNull(pendingIntent); in getPendingIntent()
696 if (pendingIntent != null) { in close()
697 pendingIntent.cancel(); in close()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowPendingIntentTest.java41 PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 99, intent, 100); in getBroadcast_shouldCreateIntentForBroadcast() local
43 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getBroadcast_shouldCreateIntentForBroadcast()
57 PendingIntent pendingIntent = PendingIntent.getActivity(context, 99, intent, 100); in getActivity_shouldCreateIntentForBroadcast() local
59 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getActivity_shouldCreateIntentForBroadcast()
73 PendingIntent pendingIntent = PendingIntent.getActivities(context, 99, intents, 100); in getActivities_shouldCreateIntentForBroadcast() local
75 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getActivities_shouldCreateIntentForBroadcast()
78 pendingIntent.send(); in getActivities_shouldCreateIntentForBroadcast()
88 PendingIntent pendingIntent = in getActivities_withBundle_shouldCreateIntentForBroadcast() local
91 ShadowPendingIntent shadow = shadowOf(pendingIntent); in getActivities_withBundle_shouldCreateIntentForBroadcast()
94 pendingIntent.send(); in getActivities_withBundle_shouldCreateIntentForBroadcast()
[all …]
DShadowAlarmManagerTest.java213 PendingIntent pendingIntent = PendingIntent.getActivity(activity, 0, intent, 0); in shouldSupportGetNextScheduledAlarm() local
214 alarmManager.set(AlarmManager.ELAPSED_REALTIME, now, pendingIntent); in shouldSupportGetNextScheduledAlarm()
218 assertScheduledAlarm(now, pendingIntent, scheduledAlarm); in shouldSupportGetNextScheduledAlarm()
227 PendingIntent pendingIntent = PendingIntent.getActivity(activity, 0, intent, 0); in getNextScheduledAlarm_shouldReturnRepeatingAlarms() local
228 alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME, now, INTERVAL_HOUR, pendingIntent); in getNextScheduledAlarm_shouldReturnRepeatingAlarms()
232 assertRepeatingScheduledAlarm(now, INTERVAL_HOUR, pendingIntent, scheduledAlarm); in getNextScheduledAlarm_shouldReturnRepeatingAlarms()
241 PendingIntent pendingIntent = PendingIntent.getActivity(activity, 0, intent, 0); in peekNextScheduledAlarm_shouldReturnNextAlarm() local
242 alarmManager.set(AlarmManager.ELAPSED_REALTIME, now, pendingIntent); in peekNextScheduledAlarm_shouldReturnNextAlarm()
246 assertScheduledAlarm(now, pendingIntent, scheduledAlarm); in peekNextScheduledAlarm_shouldReturnNextAlarm()
252 PendingIntent pendingIntent = in cancel_removesMatchingPendingIntents() local
[all …]
DShadowNotificationTest.java18 PendingIntent pendingIntent = PendingIntent.getActivity(application, 0, new Intent(), 0); in setLatestEventInfo__shouldCaptureContentIntent() local
20 notification.setLatestEventInfo(application, "title", "content", pendingIntent); in setLatestEventInfo__shouldCaptureContentIntent()
21 assertThat(notification.contentIntent).isSameInstanceAs(pendingIntent); in setLatestEventInfo__shouldCaptureContentIntent()
/external/robolectric/shadows/framework/src/main/java/org/robolectric/fakes/
DRoboIntentSender.java16 private PendingIntent pendingIntent; field in RoboIntentSender
18 public RoboIntentSender(PendingIntent pendingIntent) { in RoboIntentSender() argument
20 this.pendingIntent = pendingIntent; in RoboIntentSender()
28 return Objects.equals(pendingIntent, ((RoboIntentSender) other).pendingIntent); in equals()
33 return pendingIntent.hashCode(); in hashCode()
40 pendingIntent.send(context, code, intent); in sendIntent()
47 return pendingIntent; in getPendingIntent()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/fakes/
DRoboIntentSender.java15 private PendingIntent pendingIntent; field in RoboIntentSender
17 public RoboIntentSender(PendingIntent pendingIntent) { in RoboIntentSender() argument
19 this.pendingIntent = pendingIntent; in RoboIntentSender()
26 pendingIntent.send(context, code, intent); in sendIntent()
/external/robolectric/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowBluetoothLeScanner.java44 public abstract PendingIntent pendingIntent(); in pendingIntent() method in ShadowBluetoothLeScanner.ScanParams
58 List<ScanFilter> filters, ScanSettings settings, PendingIntent pendingIntent) { in create() argument
62 filtersCopy, settings, pendingIntent, null); in create()
85 List<ScanFilter> filters, ScanSettings settings, PendingIntent pendingIntent) { in startScan() argument
89 activeScanParams.add(ScanParams.create(filters, settings, pendingIntent)); in startScan()
102 protected void stopScan(PendingIntent pendingIntent) { in stopScan() argument
106 activeScanParams, input -> !Objects.equals(pendingIntent, input.pendingIntent()))); in stopScan()
DShadowPendingIntent.java136 PendingIntent pendingIntent = i.next(); in cancel() local
137 if (pendingIntent == realPendingIntent) { in cancel()
217 : (pendingIntent, intent1, resultCode, resultData, resultExtras) -> in send()
221 pendingIntent, intent1, resultCode, resultData, resultExtras)); in send()
602 PendingIntent pendingIntent = getCreatedIntentFor(type, intents, requestCode, flags); in create() local
604 return pendingIntent; in create()
608 if (pendingIntent != null && (flags & FLAG_UPDATE_CURRENT) != 0) { in create()
609 ShadowPendingIntent shadowPendingIntent = Shadow.extract(pendingIntent); in create()
616 return pendingIntent; in create()
620 if (pendingIntent != null && (flags & FLAG_CANCEL_CURRENT) != 0) { in create()
[all …]
DShadowSmsManager.java443 @Nullable protected final PendingIntent pendingIntent; field in ShadowSmsManager.MultimediaMessageParams
450 @Nullable PendingIntent pendingIntent, in MultimediaMessageParams() argument
455 this.pendingIntent = pendingIntent; in MultimediaMessageParams()
479 @Nullable PendingIntent pendingIntent, in SendMultimediaMessageParams() argument
481 super(contentUri, locationUrl, configOverrides, pendingIntent, messageId); in SendMultimediaMessageParams()
491 return pendingIntent; in getSentIntent()
501 @Nullable PendingIntent pendingIntent, in DownloadMultimediaMessageParams() argument
503 super(contentUri, locationUrl, configOverrides, pendingIntent, messageId); in DownloadMultimediaMessageParams()
512 return pendingIntent; in getDownloadedIntent()
DShadowBluetoothAdapter.java603 protected int startRfcommServer(String name, UUID uuid, PendingIntent pendingIntent) { in startRfcommServer() argument
606 if ((shadowOf(pendingIntent).getFlags() & PendingIntent.FLAG_IMMUTABLE) == 0) { in startRfcommServer()
615 return new BackgroundRfcommServerEntry(uuid, pendingIntent); in startRfcommServer()
689 entry.pendingIntent.send(); in addIncomingRfcommConnection()
704 final PendingIntent pendingIntent; field in ShadowBluetoothAdapter.BackgroundRfcommServerEntry
706 BackgroundRfcommServerEntry(UUID uuid, PendingIntent pendingIntent) { in BackgroundRfcommServerEntry() argument
713 this.pendingIntent = pendingIntent; in BackgroundRfcommServerEntry()
DShadowConnectivityManager.java117 protected void registerNetworkCallback(NetworkRequest request, PendingIntent pendingIntent) { in registerNetworkCallback() argument
118 networkCallbackPendingIntents.add(pendingIntent); in registerNetworkCallback()
167 protected void unregisterNetworkCallback(PendingIntent pendingIntent) { in unregisterNetworkCallback() argument
168 if (pendingIntent == null) { in unregisterNetworkCallback()
171 if (networkCallbackPendingIntents.contains(pendingIntent)) { in unregisterNetworkCallback()
172 networkCallbackPendingIntents.remove(pendingIntent); in unregisterNetworkCallback()
DShadowLocationManager.java683 protected void requestSingleUpdate(String provider, PendingIntent pendingIntent) { in requestSingleUpdate() argument
685 provider, new RoboLocationRequest(provider, 0, 0, true), pendingIntent); in requestSingleUpdate()
689 protected void requestSingleUpdate(Criteria criteria, PendingIntent pendingIntent) { in requestSingleUpdate() argument
695 bestProvider, new RoboLocationRequest(bestProvider, 0, 0, true), pendingIntent); in requestSingleUpdate()
788 String provider, long minTime, float minDistance, PendingIntent pendingIntent) { in requestLocationUpdates() argument
790 provider, new RoboLocationRequest(provider, minTime, minDistance, false), pendingIntent); in requestLocationUpdates()
795 long minTime, float minDistance, Criteria criteria, PendingIntent pendingIntent) { in requestLocationUpdates() argument
803 pendingIntent); in requestLocationUpdates()
838 @Nullable LocationRequest request, PendingIntent pendingIntent) { in requestLocationUpdates() argument
843 request.getProvider(), new RoboLocationRequest(request), pendingIntent); in requestLocationUpdates() local
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowPendingIntent.java108 PendingIntent pendingIntent = i.next(); in cancel() local
109 if (pendingIntent == realPendingIntent) { in cancel()
347 PendingIntent pendingIntent = getCreatedIntentFor(type, intents, requestCode, flags); in create() local
349 return pendingIntent; in create()
353 if (pendingIntent != null && (flags & FLAG_UPDATE_CURRENT) != 0) { in create()
354 ShadowPendingIntent shadowPendingIntent = Shadow.extract(pendingIntent); in create()
361 return pendingIntent; in create()
365 if (pendingIntent != null && (flags & FLAG_CANCEL_CURRENT) != 0) { in create()
366 ShadowPendingIntent shadowPendingIntent = Shadow.extract(pendingIntent); in create()
368 pendingIntent = null; in create()
[all …]
DShadowLocationManager.java282 long minTime, float minDistance, Criteria criteria, PendingIntent pendingIntent) { in requestLocationUpdates() argument
283 if (pendingIntent == null) { in requestLocationUpdates()
289 requestLocationUdpateCriteriaPendingIntents.put(pendingIntent, criteria); in requestLocationUpdates()
294 String provider, long minTime, float minDistance, PendingIntent pendingIntent) { in requestLocationUpdates() argument
295 if (pendingIntent == null) { in requestLocationUpdates()
302 requestLocationUdpateProviderPendingIntents.put(pendingIntent, provider); in requestLocationUpdates()
323 protected void removeUpdates(PendingIntent pendingIntent) { in removeUpdates() argument
324 while (requestLocationUdpateCriteriaPendingIntents.remove(pendingIntent) != null); in removeUpdates()
325 while (requestLocationUdpateProviderPendingIntents.remove(pendingIntent) != null); in removeUpdates()
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/ui/src/main/java/com/google/android/exoplayer2/ui/
DDefaultMediaDescriptionAdapter.java35 @Nullable private final PendingIntent pendingIntent; field in DefaultMediaDescriptionAdapter
43 public DefaultMediaDescriptionAdapter(@Nullable PendingIntent pendingIntent) { in DefaultMediaDescriptionAdapter() argument
44 this.pendingIntent = pendingIntent; in DefaultMediaDescriptionAdapter()
61 return pendingIntent; in createCurrentContentIntent()
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/ui/src/main/java/com/google/android/exoplayer2/ui/
DDefaultMediaDescriptionAdapter.java35 @Nullable private final PendingIntent pendingIntent; field in DefaultMediaDescriptionAdapter
43 public DefaultMediaDescriptionAdapter(@Nullable PendingIntent pendingIntent) { in DefaultMediaDescriptionAdapter() argument
44 this.pendingIntent = pendingIntent; in DefaultMediaDescriptionAdapter()
61 return pendingIntent; in createCurrentContentIntent()
/external/libtextclassifier/java/tests/instrumentation/src/com/android/textclassifier/
DActionsSuggestionsHelperTest.java150 PendingIntent pendingIntent = in testDeduplicateActions() local
155 .setAction(new RemoteAction(icon, "label", "1", pendingIntent)) in testDeduplicateActions()
160 .setAction(new RemoteAction(icon, "label", "2", pendingIntent)) in testDeduplicateActions()
165 .setAction(new RemoteAction(icon, "label", "3", pendingIntent)) in testDeduplicateActions()
170 .setAction(new RemoteAction(icon, "another_label", "4", pendingIntent)) in testDeduplicateActions()
175 .setAction(new RemoteAction(icon, "label", "5", pendingIntent)) in testDeduplicateActions()
204 PendingIntent pendingIntent = in testDeduplicateActions_nullComponent() local
209 .setAction(new RemoteAction(icon, "label", "1", pendingIntent)) in testDeduplicateActions_nullComponent()
214 .setAction(new RemoteAction(icon, "label", "2", pendingIntent)) in testDeduplicateActions_nullComponent()
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/ui/src/test/java/com/google/android/exoplayer2/ui/
DDefaultMediaDescriptionAdapterTest.java42 PendingIntent pendingIntent = in getters_returnMediaMetadataValues() local
44 DefaultMediaDescriptionAdapter adapter = new DefaultMediaDescriptionAdapter(pendingIntent); in getters_returnMediaMetadataValues()
48 assertThat(adapter.createCurrentContentIntent(player)).isEqualTo(pendingIntent); in getters_returnMediaMetadataValues()
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/ui/src/test/java/com/google/android/exoplayer2/ui/
DDefaultMediaDescriptionAdapterTest.java42 PendingIntent pendingIntent = in getters_returnMediaMetadataValues() local
44 DefaultMediaDescriptionAdapter adapter = new DefaultMediaDescriptionAdapter(pendingIntent); in getters_returnMediaMetadataValues()
48 assertThat(adapter.createCurrentContentIntent(player)).isEqualTo(pendingIntent); in getters_returnMediaMetadataValues()
/external/libtextclassifier/java/src/com/android/textclassifier/common/intent/
DLabeledIntent.java161 final PendingIntent pendingIntent = createPendingIntent(context, resolvedIntent, requestCode); in createRemoteAction() local
173 pendingIntent); in createRemoteAction()

12