Home
last modified time | relevance | path

Searched refs:mReceiver (Results 1 – 25 of 55) sorted by relevance

123

/cts/tests/admin/src/android/admin/cts/
DDeviceAdminReceiverTest.java73 public DeviceAdminReceiver mReceiver; field in DeviceAdminReceiverTest
79 mReceiver = new DeviceAdminReceiver(); in setUp()
91 mReceiver.onReceive(mContext, new Intent(DeviceAdminReceiver.ACTION_PASSWORD_CHANGED) in testOnReceivePasswordChanged()
93 verify(mReceiver).onPasswordChanged(any(), actionEq(ACTION_PASSWORD_CHANGED), eq(USER)); in testOnReceivePasswordChanged()
94 verify(mReceiver).onPasswordChanged(any(), actionEq(ACTION_PASSWORD_CHANGED)); in testOnReceivePasswordChanged()
102 mReceiver.onReceive(mContext, new Intent(DeviceAdminReceiver.ACTION_PASSWORD_FAILED) in testOnReceivePasswordFailed()
104 verify(mReceiver).onPasswordFailed(any(), actionEq(ACTION_PASSWORD_FAILED), eq(USER)); in testOnReceivePasswordFailed()
105 verify(mReceiver).onPasswordFailed(any(), actionEq(ACTION_PASSWORD_FAILED)); in testOnReceivePasswordFailed()
113 mReceiver.onReceive(mContext, new Intent(DeviceAdminReceiver.ACTION_PASSWORD_SUCCEEDED) in testOnReceivePasswordSucceeded()
115 verify(mReceiver).onPasswordSucceeded(any(), actionEq(ACTION_PASSWORD_SUCCEEDED), eq(USER)); in testOnReceivePasswordSucceeded()
[all …]
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DActivityTransitionTest.java39 private PassInfo mReceiver; field in ActivityTransitionTest
62 mReceiver = new PassInfo(new Handler()); in testOnSharedElementsArrived()
95 intent.putExtra(ActivityTransitionActivity.RESULT_RECEIVER, mReceiver); in testOnSharedElementsArrived()
103 assertNotNull(mReceiver.resultData); in testOnSharedElementsArrived()
104 assertEquals(2, mReceiver.resultData.getInt( in testOnSharedElementsArrived()
107 assertNotSame(View.VISIBLE, mReceiver.resultData.getInt( in testOnSharedElementsArrived()
109 assertNotSame(View.VISIBLE, mReceiver.resultData.getInt( in testOnSharedElementsArrived()
111 long enterTimeReady = mReceiver.resultData.getLong( in testOnSharedElementsArrived()
113 long returnTimeReady = mReceiver.resultData.getLong( in testOnSharedElementsArrived()
115 long enterTime = mReceiver.resultData.getLong( in testOnSharedElementsArrived()
[all …]
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DNotificationListenerTest.java59 private final LocalBroadcastReceiver mReceiver = new LocalBroadcastReceiver(); field in NotificationListenerTest
75 LocalBroadcastManager.getInstance(mContext).registerReceiver(mReceiver, filter); in setUp()
80 LocalBroadcastManager.getInstance(mContext).unregisterReceiver(mReceiver); in tearDown()
109 assertThat(mReceiver.waitForNotificationPostedReceived()).isTrue(); in testCanReceiveNotifications()
111 assertThat(mReceiver.waitForNotificationRemovedReceived()).isTrue(); in testCanReceiveNotifications()
113 mReceiver.reset(); in testCanReceiveNotifications()
116 assertThat(mReceiver.waitForNotificationPostedReceived()).isTrue(); in testCanReceiveNotifications()
118 assertThat(mReceiver.waitForNotificationRemovedReceived()).isTrue(); in testCanReceiveNotifications()
127 assertThat(mReceiver.waitForNotificationPostedReceived()).isFalse(); in testCannotReceiveProfileNotifications()
129 assertThat(mReceiver.waitForNotificationRemovedReceived()).isFalse(); in testCannotReceiveProfileNotifications()
[all …]
/cts/tests/tests/appwidget/packages/src/android/appwidget/cts/packages/
DAppWidgetConfirmPin.java32 private BroadcastReceiver mReceiver; field in AppWidgetConfirmPin
50 mReceiver = new BroadcastReceiver() { in onCreate()
56 registerReceiver(mReceiver, new IntentFilter(Constants.ACTION_CONFIRM_PIN)); in onCreate()
67 if (mReceiver != null) { in onDestroy()
68 unregisterReceiver(mReceiver); in onDestroy()
69 mReceiver = null; in onDestroy()
/cts/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/
DMyService.java49 private MyBroadcastReceiver mReceiver; field in MyService
59 if (mReceiver != null) {
60 Log.d(TAG, "receiver already registered: " + mReceiver);
64 mReceiver = new MyBroadcastReceiver(DYNAMIC_RECEIVER);
65 context.registerReceiver(mReceiver, new IntentFilter(ACTION_RECEIVER_READY));
66 context.registerReceiver(mReceiver,
172 if (mReceiver != null) { in onDestroy()
173 Log.d(TAG, "onDestroy(): unregistering " + mReceiver); in onDestroy()
174 getApplicationContext().unregisterReceiver(mReceiver); in onDestroy()
/cts/hostsidetests/devicepolicy/app/Assistant/src/com/android/cts/devicepolicy/assistapp/
DMyInteractionService.java34 private AssistReceiver mReceiver; field in MyInteractionService
40 mReceiver = new AssistReceiver(); in onCreate()
44 registerReceiver(mReceiver, intentFilter); in onCreate()
58 unregisterReceiver(mReceiver); in onDestroy()
59 mReceiver = null; in onDestroy()
/cts/hostsidetests/devicepolicy/app/ContentCaptureApp/src/com/android/cts/devicepolicy/contentcaptureapp/
DSimpleActivity.java32 private SimpleActivityReceiver mReceiver; field in SimpleActivity
39 mReceiver = new SimpleActivityReceiver(); in onCreate()
40 registerReceiver(mReceiver, new IntentFilter(SimpleActivityReceiver.ACTION)); in onCreate()
57 unregisterReceiver(mReceiver); in onDestroy()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DApplicationHiddenTest.java47 private final ApplicationHiddenReceiver mReceiver = new ApplicationHiddenReceiver(); field in ApplicationHiddenTest
52 mContext.registerReceiver(mReceiver, PACKAGE_INTENT_FILTER); in setUp()
57 mContext.unregisterReceiver(mReceiver); in tearDown()
67 mReceiver.waitForRemovedBroadcast(); in testSetApplicationHidden()
72 mReceiver.waitForAddedBroadcast(); in testSetApplicationHidden()
DContentCaptureActivity.java45 private ContentCaptureActivityReceiver mReceiver; field in ContentCaptureActivity
50 mReceiver = new ContentCaptureActivityReceiver(); in onCreate()
51 registerReceiver(mReceiver, new IntentFilter(ContentCaptureActivityReceiver.ACTION)); in onCreate()
75 unregisterReceiver(mReceiver); in onDestroy()
DCustomizationRestrictionsTest.java62 private final BlockingBroadcastReceiver mReceiver; field in CustomizationRestrictionsTest.BroadcastReceiverRegistrator
67 mReceiver = new BlockingBroadcastReceiver(); in BroadcastReceiverRegistrator()
68 mContext.registerReceiver(mReceiver, filter); in BroadcastReceiverRegistrator()
73 mContext.unregisterReceiver(mReceiver); in close()
77 mReceiver.waitForBroadcast(); in waitForBroadcast()
DPersistentIntentResolvingTest.java30 private BroadcastReceiver mReceiver; field in PersistentIntentResolvingTest
40 mReceiver = new ConfirmReceiver(); in setUp()
41 mContext.registerReceiver(mReceiver, filter); in setUp()
53 mContext.unregisterReceiver(mReceiver); in tearDown()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/notifications/
DMockConditionProvider.java38 private BroadcastReceiver mReceiver; field in MockConditionProvider
53 if (mReceiver != null) { in onDestroy()
54 unregisterReceiver(mReceiver); in onDestroy()
56 mReceiver = null; in onDestroy()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/p2p/testcase/
DGoNegRespTestCase.java33 private WifiP2pBroadcastReceiver mReceiver; field in GoNegRespTestCase
38 mReceiver = new WifiP2pBroadcastReceiver(); in GoNegRespTestCase()
43 mContext.registerReceiver(mReceiver, mIntentFilter); in setUp()
71 mContext.unregisterReceiver(mReceiver); in tearDown()
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DVoiceInteractionTest.java51 private TestResultsReceiver mReceiver; field in VoiceInteractionTest
61 mReceiver = new TestResultsReceiver(); in setUp()
62 mContext.registerReceiver(mReceiver, new IntentFilter(Utils.BROADCAST_INTENT)); in setUp()
68 if (mReceiver != null) { in tearDown()
70 mContext.unregisterReceiver(mReceiver); in tearDown()
76 mReceiver = null; in tearDown()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DCallbackAsserter.java91 private final BroadcastReceiver mReceiver; field in CallbackAsserter.BroadcastAsserter
94 mReceiver = new BroadcastReceiver() { in BroadcastAsserter()
104 InstrumentationRegistry.getContext().registerReceiver(mReceiver, filter); in BroadcastAsserter()
109 InstrumentationRegistry.getContext().unregisterReceiver(mReceiver); in cleanUp()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DCallbackAsserter.java90 private final BroadcastReceiver mReceiver; field in CallbackAsserter.BroadcastAsserter
93 mReceiver = new BroadcastReceiver() { in BroadcastAsserter()
103 InstrumentationRegistry.getContext().registerReceiver(mReceiver, filter); in BroadcastAsserter()
108 InstrumentationRegistry.getContext().unregisterReceiver(mReceiver); in cleanUp()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DWaitForBroadcast.java35 final BroadcastReceiver mReceiver = new BroadcastReceiver() { field in WaitForBroadcast
56 mContext.registerReceiver(mReceiver, filter); in prepare()
82 mContext.unregisterReceiver(mReceiver); in cleanup()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/nfc/hcef/
DHceFEmulatorActivity.java36 final BroadcastReceiver mReceiver = new BroadcastReceiver() { field in HceFEmulatorActivity
61 registerReceiver(mReceiver, filter); in onResume()
70 unregisterReceiver(mReceiver); in onPause()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/admin/
DScreenLockTestActivity.java39 private ScreenOffReceiver mReceiver; field in ScreenLockTestActivity
67 mReceiver = new ScreenOffReceiver(); in onCreate()
70 registerReceiver(mReceiver, filter); in onCreate()
99 unregisterReceiver(mReceiver); in onDestroy()
/cts/tests/framework/base/windowmanager/app_base/src/android/server/wm/app/
DTestActivity.java32 private BroadcastReceiver mReceiver = new BroadcastReceiver() { field in TestActivity
55 registerReceiver(mReceiver, new IntentFilter(TEST_ACTIVITY_ACTION_FINISH_SELF)); in onStart()
70 unregisterReceiver(mReceiver); in onStop()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBluetoothToggleActivity.java48 private BluetoothBroadcastReceiver mReceiver; field in BluetoothToggleActivity
64 mReceiver = new BluetoothBroadcastReceiver(); in onCreate()
66 registerReceiver(mReceiver, filter); in onCreate()
154 unregisterReceiver(mReceiver); in onDestroy()
/cts/tests/tests/assist/service/src/android/assist/service/
DMainInteractionSession.java49 private BroadcastReceiver mReceiver; field in MainInteractionSession
62 mReceiver = new BroadcastReceiver() { in onCreate()
77 mContext.registerReceiver(mReceiver, filter, Context.RECEIVER_VISIBLE_TO_INSTANT_APPS); in onCreate()
84 if (mReceiver != null) { in onDestroy()
85 mContext.unregisterReceiver(mReceiver); in onDestroy()
/cts/hostsidetests/systemui/app/src/android/systemui/cts/
DTestTileService.java73 registerReceiver(mReceiver, filter); in onStartListening()
87 unregisterReceiver(mReceiver); in onStopListening()
143 private final BroadcastReceiver mReceiver = new BroadcastReceiver() { field in TestTileService
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/mtp/
DMtpHostTestActivity.java111 private BroadcastReceiver mReceiver; field in MtpHostTestActivity
167 if (mReceiver != null) { in onDestroy()
168 unregisterReceiver(mReceiver); in onDestroy()
169 mReceiver = null; in onDestroy()
252 mReceiver = new BroadcastReceiver() {
256 mReceiver = null;
260 registerReceiver(mReceiver, new IntentFilter(ACTION_PERMISSION_GRANTED));
/cts/hostsidetests/wifibroadcasts/app/src/android/wifibroadcasts/app/
DWifiBroadcastsDeviceActivity.java38 private final BroadcastReceiver mReceiver = new BroadcastReceiver() { field in WifiBroadcastsDeviceActivity
55 mContext.registerReceiver(mReceiver, filter); in onCreate()

123