Home
last modified time | relevance | path

Searched refs:BroadcastReceiver (Results 1 – 25 of 681) sorted by relevance

12345678910>>...28

/frameworks/base/services/tests/servicestests/src/com/android/server/statusbar/
DNoBroadcastContextWrapper.java19 import android.content.BroadcastReceiver;
48 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
53 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
59 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
65 public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
73 public Intent registerReceiverForAllUsers(@Nullable BroadcastReceiver receiver, in registerReceiverForAllUsers()
81 public Intent registerReceiverForAllUsers(@Nullable BroadcastReceiver receiver, in registerReceiverForAllUsers()
89 public Intent registerReceiverAsUser(@Nullable BroadcastReceiver receiver, UserHandle user, in registerReceiverAsUser()
97 public Intent registerReceiverAsUser(@Nullable BroadcastReceiver receiver, UserHandle user, in registerReceiverAsUser()
108 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/dagger/
DDefaultBroadcastReceiverBinder.java19 import android.content.BroadcastReceiver;
44 public abstract BroadcastReceiver bindSmartActionsReceiver( in bindSmartActionsReceiver()
53 public abstract BroadcastReceiver bindMediaOutputDialogReceiver( in bindMediaOutputDialogReceiver()
62 public abstract BroadcastReceiver bindPeopleSpaceWidgetPinnedReceiver( in bindPeopleSpaceWidgetPinnedReceiver()
71 public abstract BroadcastReceiver bindPeopleSpaceWidgetProvider( in bindPeopleSpaceWidgetProvider()
80 public abstract BroadcastReceiver bindGuestResetOrExitSessionReceiver( in bindGuestResetOrExitSessionReceiver()
89 public abstract BroadcastReceiver bindHearingDevicesDialogReceiver( in bindHearingDevicesDialogReceiver()
DContextComponentResolver.java21 import android.content.BroadcastReceiver;
38 private final Map<Class<?>, Provider<BroadcastReceiver>> mBroadcastReceiverCreators;
44 Map<Class<?>, Provider<BroadcastReceiver>> broadcastReceiverCreators) { in ContextComponentResolver()
63 public BroadcastReceiver resolveBroadcastReceiver(String className) { in resolveBroadcastReceiver()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/
DSysuiTestableContext.java18 import android.content.BroadcastReceiver;
41 private final Set<BroadcastReceiver> mRegisteredReceivers = new ArraySet<>();
71 Set<BroadcastReceiver> copy; in cleanUpReceivers()
76 for (BroadcastReceiver r : copy) { in cleanUpReceivers()
87 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
97 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, int flags) { in registerReceiver()
107 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
118 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
129 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user, in registerReceiverAsUser()
140 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user, in registerReceiverAsUser()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/broadcast/
DFakeBroadcastDispatcher.kt19 import android.content.BroadcastReceiver
20 import android.content.BroadcastReceiver.PendingResult
67 receiver: BroadcastReceiver, in registerReceiverWithHandler()
78 receiver: BroadcastReceiver, in registerReceiver()
88 override fun unregisterReceiver(receiver: BroadcastReceiver) { in unregisterReceiver()
92 override fun unregisterReceiverForUser(receiver: BroadcastReceiver, user: UserHandle) { in unregisterReceiverForUser()
139 val receiver: BroadcastReceiver,
/frameworks/base/packages/SystemUI/src/com/android/systemui/broadcast/
DActionReceiver.kt19 import android.content.BroadcastReceiver
53 private val registerAction: BroadcastReceiver.(IntentFilter) -> Unit,
54 private val unregisterAction: BroadcastReceiver.() -> Unit,
57 private val testPendingRemovalAction: (BroadcastReceiver, Int) -> Boolean
58 ) : BroadcastReceiver(), Dumpable {
87 fun hasReceiver(receiver: BroadcastReceiver): Boolean { in hasReceiver()
97 fun removeReceiver(receiver: BroadcastReceiver) { in removeReceiver()
DBroadcastDispatcher.kt19 import android.content.BroadcastReceiver in <lambda>()
48 val receiver: BroadcastReceiver, in <lambda>()
114 receiver: BroadcastReceiver, in <lambda>()
142 receiver: BroadcastReceiver, in <lambda>()
175 map: (Intent, BroadcastReceiver) -> T, in <lambda>()
177 val receiver = object : BroadcastReceiver() { in <lambda>()
229 open fun unregisterReceiver(receiver: BroadcastReceiver) { in <lambda>()
240 open fun unregisterReceiverForUser(receiver: BroadcastReceiver, user: UserHandle) { in <lambda>()
295 receiversByUser.valueAt(it).unregisterReceiver(msg.obj as BroadcastReceiver) in <lambda>()
298 msg.obj as BroadcastReceiver, in <lambda>()
[all …]
DPendingRemovalStore.kt3 import android.content.BroadcastReceiver
23 private val pendingRemoval: SparseSetArray<BroadcastReceiver> = SparseSetArray()
25 fun tagForRemoval(broadcastReceiver: BroadcastReceiver, userId: Int) { in tagForRemoval()
32 fun isPendingRemoval(broadcastReceiver: BroadcastReceiver, userId: Int): Boolean { in isPendingRemoval()
39 fun clearPendingRemoval(broadcastReceiver: BroadcastReceiver, userId: Int) { in clearPendingRemoval()
/frameworks/base/test-mock/api/
Dsystem-lint-baseline.txt2 …d.test.mock.MockContext#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.con…
6 …d.test.mock.MockContext#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.con…
8 …d.test.mock.MockContext#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.con…
10 …d.test.mock.MockContext#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.con…
12 …d.test.mock.MockContext#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.con…
14 …d.test.mock.MockContext#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.con…
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DSliceBroadcastRelayHandlerTest.java26 import android.content.BroadcastReceiver;
125 ArgumentCaptor<BroadcastReceiver> relay = ArgumentCaptor.forClass(BroadcastReceiver.class); in testUnregister()
152 Receiver.sReceiver = mock(BroadcastReceiver.class); in testRelay()
167 ArgumentCaptor<BroadcastReceiver> relay = ArgumentCaptor.forClass(BroadcastReceiver.class); in testRelay()
181 .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); in testRegisteredWithDispatcher_onMainThread()
183 .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); in testRegisteredWithDispatcher_onMainThread()
193 .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class), in testRegisteredWithDispatcher_onBackgroundThread()
196 .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); in testRegisteredWithDispatcher_onBackgroundThread()
199 public static class Receiver extends BroadcastReceiver {
200 private static BroadcastReceiver sReceiver;
/frameworks/libs/systemui/toruslib/torus-utils/src/main/java/com/google/android/torus/utils/broadcast/
DBroadcastEventController.kt19 import android.content.BroadcastReceiver in <lambda>()
33 private val broadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() { in <lambda>()
83 broadcastReceiver: BroadcastReceiver?, in <lambda>()
89 protected fun unregisterReceiver(context: Context, broadcastReceiver: BroadcastReceiver?) { in <lambda>()
/frameworks/base/services/core/java/com/android/server/location/injector/
DSystemDeviceIdleHelper.java20 import android.content.BroadcastReceiver;
43 private @Nullable BroadcastReceiver mReceiver;
75 BroadcastReceiver receiver = new BroadcastReceiver() { in onRegistrationStateChanged()
86 BroadcastReceiver receiver = mReceiver; in onRegistrationStateChanged()
/frameworks/base/tests/utils/testutils/java/com/android/internal/util/test/
DBroadcastInterceptingContext.java19 import android.content.BroadcastReceiver;
64 private final BroadcastReceiver mReceiver;
68 public BroadcastInterceptor(BroadcastReceiver receiver, IntentFilter filter, in BroadcastInterceptor()
149 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
162 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, int flags) { in registerReceiver()
167 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
181 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
190 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DBroadcastTest.java23 import android.content.BroadcastReceiver;
229 private BroadcastReceiver mReceiver = new BroadcastReceiver() {
264 private class TestBroadcastReceiver extends BroadcastReceiver {
392 BroadcastReceiver finish = new BroadcastReceiver() { in testRegisteredReceivePermissionDenied()
419 BroadcastReceiver finish = new BroadcastReceiver() { in testRegisteredBroadcastPermissionDenied()
441 BroadcastReceiver finish = new BroadcastReceiver() { in ignore_testLocalReceivePermissionDenied()
465 BroadcastReceiver finish = new BroadcastReceiver() { in testLocalBroadcastPermissionDenied()
487 BroadcastReceiver finish = new BroadcastReceiver() { in ignore_testRemoteReceivePermissionDenied()
511 BroadcastReceiver finish = new BroadcastReceiver() { in testRemoteBroadcastPermissionDenied()
/frameworks/base/packages/SystemUI/docs/
Dbroadcasts.md5 …consolidates most `BroadcastReceiver` that exist in SystemUI by merging the `IntentFilter` and sub…
9 Having a single `BroadcastReceiver` in SystemUI improves the multi dispatch situation that occurs w…
10 * All supported `BroadcastReceiver` will be aggregated into one single receiver per user.
11 …or `USER_ALL`). This is meaninful for actions that are filtered by `BroadcastReceiver` in multiple…
18 The dispatcher supports `BroadcastReceiver` dynamic subscriptions in the following cases:
33 If introducing a new `BroadcastReceiver` (not declared in `AndroidManifest`) that satisfies the con…
41 …broadcasts that match the filter will be sent to the just registered `BroadcastReceiver#onReceive`.
47 * Do not use the dispatcher to obtain the last broadcast (by passing a null `BroadcastReceiver`). `…
64 * @param executor An executor to dispatch [BroadcastReceiver.onReceive]. Pass null to use an
75 receiver: BroadcastReceiver,
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/broadcast/logging/
DBroadcastDispatcherLogger.kt19 import android.content.BroadcastReceiver
67 fun logBroadcastDispatched(broadcastId: Int, action: String?, receiver: BroadcastReceiver) { in logBroadcastDispatched()
78 fun logReceiverRegistered(user: Int, receiver: BroadcastReceiver, flags: Int) { in logReceiverRegistered()
90 fun logTagForRemoval(user: Int, receiver: BroadcastReceiver) { in logTagForRemoval()
100 fun logClearedAfterRemoval(user: Int, receiver: BroadcastReceiver) { in logClearedAfterRemoval()
110 fun logReceiverUnregistered(user: Int, receiver: BroadcastReceiver) { in logReceiverUnregistered()
/frameworks/base/test-mock/src/android/test/mock/
DMockContext.java23 import android.content.BroadcastReceiver;
411BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, in sendOrderedBroadcast()
420 …Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initi… in sendOrderedBroadcast()
428BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, in sendOrderedBroadcast()
461 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcastAsUser()
469 String receiverPermission, int appOp, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
477 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
484 String receiverAppOp, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcast()
492 String receiverAppOp, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcast()
509BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, in sendStickyOrderedBroadcast()
[all …]
/frameworks/base/ravenwood/junit-impl-src/android/platform/test/ravenwood/
DRavenwoodBaseContext.java18 import android.content.BroadcastReceiver;
393 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
400 int appOp, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
429 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcastAsUser()
436 String receiverPermission, int appOp, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
444 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcastAsUser()
455 public void sendStickyOrderedBroadcast(Intent intent, BroadcastReceiver resultReceiver, in sendStickyOrderedBroadcast()
480 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendStickyOrderedBroadcastAsUser()
491 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
496 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, int flags) { in registerReceiver()
[all …]
/frameworks/base/tests/ActivityManagerPerfTests/test-app/src/com/android/frameworks/perftests/amteststestapp/
DTestApplication.java20 import android.content.BroadcastReceiver;
41 BroadcastReceiver registered = new BroadcastReceiver() { in createRegisteredReceiver()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/
DNotificationLockscreenUserManagerTest.java54 import android.content.BroadcastReceiver;
542 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicyDoesNotAllowNotifications()
564 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicyDoesNotAllowNotifications_deviceOwnerSetsForUserAll()
584 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicyDoesNotAllowNotifications_userAll()
604 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicyDoesNotAllowNotifications_secondary()
634 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testKeyguardManager_noPrivateNotifications()
660 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicy_noPrivateNotifications()
691 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicy_noPrivateNotifications_userAll()
711 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testDevicePolicyPrivateNotifications_secondary()
780 BroadcastReceiver.PendingResult pr = new BroadcastReceiver.PendingResult( in testShouldShowLockscreenNotifications_keyguardManagerNoPrivateNotifications_show()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDpmMockContext.java24 import android.content.BroadcastReceiver;
341 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
349 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
358 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
396 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcastAsUser()
405 String receiverPermission, int appOp, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
414 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
427 public void sendStickyOrderedBroadcast(Intent intent, BroadcastReceiver resultReceiver, in sendStickyOrderedBroadcast()
445 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendStickyOrderedBroadcastAsUser()
457 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
[all …]
/frameworks/base/services/core/java/com/android/server/powerstats/
DBatteryTrigger.java19 import android.content.BroadcastReceiver;
37 private final BroadcastReceiver mBatteryLevelReceiver = new BroadcastReceiver() {
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
DConnectivityPreferenceControllerTest.java29 import android.content.BroadcastReceiver;
62 final ArgumentCaptor<BroadcastReceiver> receiverArgumentCaptor = in testBroadcastReceiver()
63 ArgumentCaptor.forClass(BroadcastReceiver.class); in testBroadcastReceiver()
77 final BroadcastReceiver receiver = receiverArgumentCaptor.getValue(); in testBroadcastReceiver()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/broadcast/
DActionReceiverTest.kt19 import android.content.BroadcastReceiver
81 private lateinit var registerFunction: BroadcastReceiver.(IntentFilter) -> Unit
83 private lateinit var unregisterFunction: BroadcastReceiver.() -> Unit
85 private lateinit var isPendingRemovalFunction: (BroadcastReceiver, Int) -> Boolean
87 private lateinit var receiver1: BroadcastReceiver
89 private lateinit var receiver2: BroadcastReceiver
170 verify(unregisterFunction, never()).invoke(any(BroadcastReceiver::class.java)) in testRemovingWhileOtherReceiversDoesntUnregister()
213 val pendingResult = mock(BroadcastReceiver.PendingResult::class.java) in testReceiverGetsPendingResult()
251 any(BroadcastReceiver::class.java)) in testBroadcastReceivedDispatched_logger()
/frameworks/base/services/tests/servicestests/test-apps/SuspendTestApp/src/com/android/servicestests/apps/suspendtestapp/
DSuspendTestActivity.java25 import android.content.BroadcastReceiver;
34 private BroadcastReceiver mFinishReceiver = new BroadcastReceiver() {

12345678910>>...28