Home
last modified time | relevance | path

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

12345678910>>...21

/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DSysuiTestableContext.java17 import android.content.BroadcastReceiver;
33 private Set<BroadcastReceiver> mRegisteredReceivers = new ArraySet<>();
57 Set<BroadcastReceiver> copy = new ArraySet<>(mRegisteredReceivers); in cleanUpReceivers()
58 for (BroadcastReceiver r : copy) { in cleanUpReceivers()
69 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
77 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
86 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user, in registerReceiverAsUser()
95 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver()
DSliceBroadcastRelayHandlerTest.java25 import android.content.BroadcastReceiver;
101 ArgumentCaptor<BroadcastReceiver> relay = ArgumentCaptor.forClass(BroadcastReceiver.class); in testUnregister()
126 Receiver.sReceiver = mock(BroadcastReceiver.class); in testRelay()
140 ArgumentCaptor<BroadcastReceiver> relay = ArgumentCaptor.forClass(BroadcastReceiver.class); in testRelay()
152 .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); in testRegisteredWithDispatcher()
154 .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class)); in testRegisteredWithDispatcher()
157 public static class Receiver extends BroadcastReceiver {
158 private static BroadcastReceiver sReceiver;
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/broadcast/
DFakeBroadcastDispatcher.kt19 import android.content.BroadcastReceiver
39 private val registeredReceivers = ArraySet<BroadcastReceiver>()
42 receiver: BroadcastReceiver, in registerReceiverWithHandler()
51 receiver: BroadcastReceiver, in registerReceiver()
59 override fun unregisterReceiver(receiver: BroadcastReceiver) { in unregisterReceiver()
63 override fun unregisterReceiverForUser(receiver: BroadcastReceiver, user: UserHandle) { in unregisterReceiverForUser()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DTestUtil.java19 import android.content.BroadcastReceiver;
37 public static void sendNetworkStateChanged(BroadcastReceiver broadcastReceiver, in sendNetworkStateChanged()
49 public static void sendNetworkStateChanged(BroadcastReceiver broadcastReceiver, in sendNetworkStateChanged()
60 public static void sendScanResultsAvailable(BroadcastReceiver broadcastReceiver, in sendScanResultsAvailable()
69 public static void sendWifiStateChanged(BroadcastReceiver broadcastReceiver, in sendWifiStateChanged()
79 public static void sendWifiApStateChanged(BroadcastReceiver broadcastReceiver, in sendWifiApStateChanged()
97 public static void sendTetherStateChanged(BroadcastReceiver broadcastReceiver, in sendTetherStateChanged()
105 public static void sendIdleModeChanged(BroadcastReceiver broadcastReceiver, Context context) { in sendIdleModeChanged()
DSupplicantStateTrackerTest.java22 import android.content.BroadcastReceiver;
81 BroadcastReceiver wifiBroadcastReceiver = new BroadcastReceiver() { in testSupplicantStateChangeIntent()
103 BroadcastReceiver wifiBroadcastReceiver = new BroadcastReceiver() { in testAuthPassInSupplicantStateChangeIntent()
129 BroadcastReceiver wifiBroadcastReceiver = new BroadcastReceiver() { in testAuthFailedInSupplicantStateChangeIntent()
156 BroadcastReceiver wifiBroadcastReceiver = new BroadcastReceiver() { in testReasonCodeInSupplicantStateChangeIntent()
DWakeupOnboardingTest.java33 import android.content.BroadcastReceiver;
132 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in dismissNotificationAction_setsOnboarded()
135 BroadcastReceiver broadcastReceiver = captor.getValue(); in dismissNotificationAction_setsOnboarded()
153 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake()
156 BroadcastReceiver broadcastReceiver = captor.getValue(); in turnOffWifiWakeAction_setsOnboardedAndTurnsOffWifiWake()
177 ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
180 BroadcastReceiver broadcastReceiver = captor.getValue(); in openWifiSettingsAction_setsOnboardedAndOpensWifiSettings()
/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/src/com/android/systemui/broadcast/
DBroadcastDispatcher.kt20 import android.content.BroadcastReceiver
41 val receiver: BroadcastReceiver,
72 ) : Dumpable, BroadcastReceiver() {
107 receiver: BroadcastReceiver, in registerReceiverWithHandler()
131 receiver: BroadcastReceiver, in registerReceiver()
161 open fun unregisterReceiver(receiver: BroadcastReceiver) { in unregisterReceiver()
171 open fun unregisterReceiverForUser(receiver: BroadcastReceiver, user: UserHandle) { in unregisterReceiverForUser()
217 receiversByUser.valueAt(it).unregisterReceiver(msg.obj as BroadcastReceiver) in handleMessage()
222 receiversByUser.get(msg.arg1)?.unregisterReceiver(msg.obj as BroadcastReceiver) in handleMessage()
DActionReceiver.kt19 import android.content.BroadcastReceiver
47 private val registerAction: BroadcastReceiver.(IntentFilter) -> Unit,
48 private val unregisterAction: BroadcastReceiver.() -> Unit,
51 ) : BroadcastReceiver(), Dumpable {
80 fun hasReceiver(receiver: BroadcastReceiver): Boolean { in hasReceiver()
90 fun removeReceiver(receiver: BroadcastReceiver) { in removeReceiver()
DUserBroadcastDispatcher.kt19 import android.content.BroadcastReceiver in <lambda>()
68 MSG_UNREGISTER_RECEIVER -> handleUnregisterReceiver(msg.obj as BroadcastReceiver) in <lambda>()
77 private val receiverToActions = ArrayMap<BroadcastReceiver, MutableSet<String>>() in <lambda>()
80 internal fun isReceiverReferenceHeld(receiver: BroadcastReceiver): Boolean { in <lambda>()
96 fun unregisterReceiver(receiver: BroadcastReceiver) { in <lambda>()
139 private fun handleUnregisterReceiver(receiver: BroadcastReceiver) { in <lambda>()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DBroadcastTest.java21 import android.content.BroadcastReceiver;
225 private BroadcastReceiver mReceiver = new BroadcastReceiver() {
260 private class TestBroadcastReceiver extends BroadcastReceiver {
385 BroadcastReceiver finish = new BroadcastReceiver() { in testRegisteredReceivePermissionDenied()
412 BroadcastReceiver finish = new BroadcastReceiver() { in testRegisteredBroadcastPermissionDenied()
434 BroadcastReceiver finish = new BroadcastReceiver() { in testLocalReceivePermissionDenied()
458 BroadcastReceiver finish = new BroadcastReceiver() { in testLocalBroadcastPermissionDenied()
480 BroadcastReceiver finish = new BroadcastReceiver() { in testRemoteReceivePermissionDenied()
504 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:
31 If introducing a new `BroadcastReceiver` (not declared in `AndroidManifest`) that satisfies the con…
39 …broadcasts that match the filter will be sent to the just registered `BroadcastReceiver#onReceive`.
45 * Do not use the dispatcher to obtain the last broadcast (by passing a null `BroadcastReceiver`). `…
62 * @param executor An executor to dispatch [BroadcastReceiver.onReceive]. Pass null to use an
71 BroadcastReceiver,
[all …]
/frameworks/base/test-mock/src/android/test/mock/
DMockContext.java23 import android.content.BroadcastReceiver;
404BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, in sendOrderedBroadcast()
413 …Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initi… in sendOrderedBroadcast()
421BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, in sendOrderedBroadcast()
454 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcastAsUser()
462 String receiverPermission, int appOp, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
470 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
477 String receiverAppOp, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcast()
485 String receiverAppOp, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcast()
497BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, in sendStickyOrderedBroadcast()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDpmMockContext.java23 import android.content.BroadcastReceiver;
314 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
322 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
331 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
369 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, in sendOrderedBroadcastAsUser()
378 String receiverPermission, int appOp, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
387 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver, in sendOrderedBroadcastAsUser()
400 public void sendStickyOrderedBroadcast(Intent intent, BroadcastReceiver resultReceiver, in sendStickyOrderedBroadcast()
418 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendStickyOrderedBroadcastAsUser()
430 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
[all …]
/frameworks/base/tests/utils/testutils/java/com/android/internal/util/test/
DBroadcastInterceptingContext.java19 import android.content.BroadcastReceiver;
63 private final BroadcastReceiver mReceiver;
66 public BroadcastInterceptor(BroadcastReceiver receiver, IntentFilter filter) { in BroadcastInterceptor()
128 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
136 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
142 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver()
/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/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
DConnectivityPreferenceControllerTest.java28 import android.content.BroadcastReceiver;
61 final ArgumentCaptor<BroadcastReceiver> receiverArgumentCaptor = in testBroadcastReceiver()
62 ArgumentCaptor.forClass(BroadcastReceiver.class); in testBroadcastReceiver()
76 final BroadcastReceiver receiver = receiverArgumentCaptor.getValue(); in testBroadcastReceiver()
/frameworks/base/packages/SystemUI/src/com/android/systemui/dagger/
DContextComponentResolver.java21 import android.content.BroadcastReceiver;
41 private final Map<Class<?>, Provider<BroadcastReceiver>> mBroadcastReceiverCreators;
48 Map<Class<?>, Provider<BroadcastReceiver>> broadcastReceiverCreators) { in ContextComponentResolver()
68 public BroadcastReceiver resolveBroadcastReceiver(String className) { in resolveBroadcastReceiver()
/frameworks/base/core/tests/coretests/BinderProxyCountingTestApp/src/com/android/frameworks/coretests/binderproxycountingtestapp/
DBpcTestAppCmdService.java20 import android.content.BroadcastReceiver;
52 private ArrayList<BroadcastReceiver> mBrList = new ArrayList();
59 BroadcastReceiver br = new BroadcastReceiver() {
77 BroadcastReceiver br;
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DRecoverySnapshotListenersStorageTest.java7 import android.content.BroadcastReceiver;
59 context.registerReceiver(new BroadcastReceiver() { in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified()
80 BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { in setSnapshotListener_doesNotRepeatedlyInvokeListener()
/frameworks/base/packages/SystemUI/src/com/android/systemui/broadcast/logging/
DBroadcastDispatcherLogger.kt19 import android.content.BroadcastReceiver
47 fun logBroadcastDispatched(broadcastId: Int, action: String?, receiver: BroadcastReceiver) { in logBroadcastDispatched()
58 fun logReceiverRegistered(user: Int, receiver: BroadcastReceiver) { in logReceiverRegistered()
68 fun logReceiverUnregistered(user: Int, receiver: BroadcastReceiver) { in logReceiverUnregistered()
/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() {
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DContextFixture.java36 import android.content.BroadcastReceiver;
333 public void unregisterReceiver(BroadcastReceiver receiver) { in unregisterReceiver()
337 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiver()
342 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, in registerReceiver()
348 public Intent registerReceiverForAllUsers(BroadcastReceiver receiver, in registerReceiverForAllUsers()
354 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user, in registerReceiverAsUser()
359 private Intent registerReceiverFakeImpl(BroadcastReceiver receiver, IntentFilter filter) { in registerReceiverFakeImpl()
377 for (BroadcastReceiver broadcastReceiver : in sendBroadcast()
398 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
410 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, in sendOrderedBroadcast()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/
DAppIntegrityManagerServiceImplTest.java47 import android.content.BroadcastReceiver;
313 ArgumentCaptor<BroadcastReceiver> broadcastReceiverCaptor = in handleBroadcast_correctArgs()
314 ArgumentCaptor.forClass(BroadcastReceiver.class); in handleBroadcast_correctArgs()
350 ArgumentCaptor<BroadcastReceiver> broadcastReceiverCaptor = in handleBroadcast_correctArgs_multipleCerts()
351 ArgumentCaptor.forClass(BroadcastReceiver.class); in handleBroadcast_correctArgs_multipleCerts()
373 ArgumentCaptor<BroadcastReceiver> broadcastReceiverCaptor = in handleBroadcast_correctArgs_sourceStamp()
374 ArgumentCaptor.forClass(BroadcastReceiver.class); in handleBroadcast_correctArgs_sourceStamp()
398 ArgumentCaptor<BroadcastReceiver> broadcastReceiverCaptor = in handleBroadcast_allow()
399 ArgumentCaptor.forClass(BroadcastReceiver.class); in handleBroadcast_allow()
417 ArgumentCaptor<BroadcastReceiver> broadcastReceiverCaptor = in handleBroadcast_reject()
[all …]
/frameworks/base/packages/InputDevices/src/com/android/inputdevices/
DInputDeviceReceiver.java19 import android.content.BroadcastReceiver;
23 public class InputDeviceReceiver extends BroadcastReceiver {

12345678910>>...21