Home
last modified time | relevance | path

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

12

/cts/tests/app/src/android/app/cts/
DDownloadManagerTest.java72 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManager() local
75 mContext.registerReceiver(receiver, intentFilter); in testDownloadManager()
86 receiver.waitForDownloadComplete(SHORT_TIMEOUT, goodId, badId); in testDownloadManager()
94 mContext.unregisterReceiver(receiver); in testDownloadManager()
99 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerSupportsHttp() local
102 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerSupportsHttp()
110 receiver.waitForDownloadComplete(SHORT_TIMEOUT, id); in testDownloadManagerSupportsHttp()
116 mContext.unregisterReceiver(receiver); in testDownloadManagerSupportsHttp()
130 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerSupportsHttpWithExternalWebServer() local
133 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerSupportsHttpWithExternalWebServer()
[all …]
DActivityManagerTest.java165 ActivityReceiverFilter receiver = new ActivityReceiverFilter(ACTIVITY_LAUNCHED_ACTION);
169 assertEquals(RESULT_PASS, receiver.waitForActivity());
170 receiver.close();
/cts/tests/tests/midi/src/android/midi/cts/
DMidiEchoTest.java337 MyLoggingReceiver receiver = new MyLoggingReceiver(); in testEchoSmallMessage() local
338 mc.echoOutputPort.connect(receiver); in testEchoSmallMessage()
352 synchronized (receiver) { in testEchoSmallMessage()
353 receiver.waitForMessages(numMessages, timeoutMs); in testEchoSmallMessage()
355 assertEquals("number of messages.", numMessages, receiver.getMessageCount()); in testEchoSmallMessage()
356 MidiMessage message = receiver.getMessage(0); in testEchoSmallMessage()
366 mc.echoOutputPort.disconnect(receiver); in testEchoSmallMessage()
377 MyLoggingReceiver receiver = new MyLoggingReceiver(); in testEchoLatency() local
378 mc.echoOutputPort.connect(receiver); in testEchoLatency()
394 synchronized (receiver) { in testEchoLatency()
[all …]
/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DModifyInstallerPackageTest.java188 SetInstallerPackageReceiver receiver = new SetInstallerPackageReceiver(); in testSetInstallPackageConflictingInstaller() local
189 getContext().sendOrderedBroadcast(intent, null, receiver, null, 0, null, null); in testSetInstallPackageConflictingInstaller()
190 receiver.assertSuccess("Failure initializing with other installer"); in testSetInstallPackageConflictingInstaller()
206 receiver = new SetInstallerPackageReceiver(); in testSetInstallPackageConflictingInstaller()
207 getContext().sendOrderedBroadcast(intent, null, receiver, null, 0, null, null); in testSetInstallPackageConflictingInstaller()
208 receiver.assertSuccess("Failure clearing other installer"); in testSetInstallPackageConflictingInstaller()
DAccessPermissionWithDiffSigTest.java510 GrantResultReceiver receiver = new GrantResultReceiver(); in grantUriPermissionFail() local
511 getContext().sendOrderedBroadcast(intent, null, receiver, null, 0, null, null); in grantUriPermissionFail()
512receiver.assertFailure("Able to grant URI permission to " + grantDataUri + " when should not"); in grantUriPermissionFail()
522 receiver = new GrantResultReceiver(); in grantUriPermissionFail()
523 getContext().sendOrderedBroadcast(intent, null, receiver, null, 0, null, null); in grantUriPermissionFail()
524 receiver.assertFailure("Able to grant URI permission to " + grantIntent.getClipData() in grantUriPermissionFail()
1377 GrantResultReceiver receiver = new GrantResultReceiver(); in assertPersistedUriPermission() local
1378 getContext().sendOrderedBroadcast(intent, null, receiver, null, 0, null, null); in assertPersistedUriPermission()
1379 receiver.assertSuccess("unexpected outgoing persisted Uri status"); in assertPersistedUriPermission()
/cts/tests/tests/permission2/src/android/permission2/cts/
DNoReceiveSmsPermissionTest.java66 IllegalSmsReceiver receiver = new IllegalSmsReceiver(); in testReceiveTextMessage() local
72 getContext().registerReceiver(receiver, filter); in testReceiveTextMessage()
74 synchronized(receiver) { in testReceiveTextMessage()
76 receiver.wait(WAIT_TIME); in testReceiveTextMessage()
83 receiver.isMessageSent()); in testReceiveTextMessage()
84 assertFalse("Sms received without proper permissions", receiver.isSmsReceived()); in testReceiveTextMessage()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DConnectivityConstraintTest.java81 ConnectivityActionReceiver receiver = in tearDown() local
86 mContext.registerReceiver(receiver, filter); in tearDown()
90 receiver.waitForStateChange()); in tearDown()
92 mContext.unregisterReceiver(receiver); in tearDown()
213 ConnectivityActionReceiver receiver = in connectToWiFi() local
218 mContext.registerReceiver(receiver, filter); in connectToWiFi()
222 receiver.waitForStateChange()); in connectToWiFi()
224 mContext.unregisterReceiver(receiver); in connectToWiFi()
/cts/tests/tests/os/src/android/os/cts/
DResultReceiverTest.java39 ResultReceiver receiver = new ResultReceiver(mHandler); in testResultReceiver() local
40 assertEquals(0, receiver.describeContents()); in testResultReceiver()
43 receiver.writeToParcel(p, 0); in testResultReceiver()
/cts/tests/tests/view/src/android/view/inputmethod/cts/
DInputMethodManagerTest.java117 ResultReceiver receiver = new ResultReceiver(handler); in testInputMethodManager()
118 assertTrue(imManager.showSoftInput(view, 0, receiver)); in testInputMethodManager()
119 receiver = new ResultReceiver(handler); in testInputMethodManager()
120 assertTrue(imManager.hideSoftInputFromWindow(token, 0, receiver)); in testInputMethodManager()
/cts/tools/vm-tests-tf/src/dot/junit/
DDxTestCase.java82 Object receiver = null; in loadAndRun() local
85 receiver = c.newInstance(); in loadAndRun()
92 method.invoke(receiver, args); in loadAndRun()
DDxAbstractMain.java86 Object receiver = null; in loadAndRun() local
89 receiver = c.newInstance(); in loadAndRun()
96 method.invoke(receiver, args); in loadAndRun()
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java347 ConnectivityActionReceiver receiver = new ConnectivityActionReceiver( in testRegisterNetworkCallback_withPendingIntent() local
349 mContext.registerReceiver(receiver, filter); in testRegisterNetworkCallback_withPendingIntent()
371 receiver.waitForState()); in testRegisterNetworkCallback_withPendingIntent()
377 mContext.unregisterReceiver(receiver); in testRegisterNetworkCallback_withPendingIntent()
404 ConnectivityReceiver receiver = new ConnectivityReceiver(); in testConnectivityChanged_whenRegistered_shouldReceiveIntent() local
407 mContext.registerReceiver(receiver, filter); in testConnectivityChanged_whenRegistered_shouldReceiveIntent()
466 ConnectivityActionReceiver receiver = new ConnectivityActionReceiver( in connectToWifi() local
470 mContext.registerReceiver(receiver, filter); in connectToWifi()
478 connected = receiver.waitForState(); in connectToWifi()
483 mContext.unregisterReceiver(receiver); in connectToWifi()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DContextWrapperTest.java116 for (BroadcastReceiver receiver : mRegisteredReceiverList) { in tearDown()
117 mContextWrapper.unregisterReceiver(receiver); in tearDown()
123 private void registerBroadcastReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerBroadcastReceiver() argument
124 mContextWrapper.registerReceiver(receiver, filter); in registerBroadcastReceiver()
126 mRegisteredReceiverList.add(receiver); in registerBroadcastReceiver()
653 final ResultReceiver receiver = new ResultReceiver(); in testSendBroadcast1() local
655 registerBroadcastReceiver(receiver, new IntentFilter(ResultReceiver.MOCK_ACTION)); in testSendBroadcast1()
662 return receiver.hasReceivedBroadCast(); in testSendBroadcast1()
668 final ResultReceiver receiver = new ResultReceiver(); in testSendBroadcast2() local
670 registerBroadcastReceiver(receiver, new IntentFilter(ResultReceiver.MOCK_ACTION)); in testSendBroadcast2()
[all …]
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/
DExternalStorageTest.java121 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerPackage() local
124 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerPackage()
131 receiver.waitForDownloadComplete(30 * DateUtils.SECOND_IN_MILLIS, id); in testDownloadManagerPackage()
134 mContext.unregisterReceiver(receiver); in testDownloadManagerPackage()
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/
DAlarmOperation.java82 BroadcastReceiver receiver = new BroadcastReceiver() { in execute() local
88 mContext.registerReceiver(receiver, intentFilter); in execute()
/cts/hostsidetests/devicepolicy/app/LauncherTests/src/com/android/cts/launchertests/
DLauncherAppsTests.java173 ActivityLaunchedReceiver receiver = new ActivityLaunchedReceiver(); in testLaunchMainActivity() local
176 mInstrumentation.getContext().registerReceiver(receiver, filter); in testLaunchMainActivity()
181 assertEquals(RESULT_PASS, receiver.waitForActivity()); in testLaunchMainActivity()
182 mInstrumentation.getContext().unregisterReceiver(receiver); in testLaunchMainActivity()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java137 private final BroadcastReceiver receiver = new BroadcastReceiver() { field in DelegatedCertInstallerTest
160 mContext.registerReceiver(receiver, filter); in setUp()
165 mContext.unregisterReceiver(receiver); in tearDown()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DBroadcastIntentReceiver.java17 package com.android.cts.intent.receiver;
DSimpleIntentReceiverActivity.java17 package com.android.cts.intent.receiver;
DOwnerChangedBroadcastTest.java17 package com.android.cts.intent.receiver;
DIntentReceiverActivity.java16 package com.android.cts.intent.receiver;
/cts/hostsidetests/theme/src/android/theme/cts/
DThemeHostTest.java238 final CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in generateDeviceImages() local
239 mDevice.executeShellCommand(START_CMD, receiver, TEST_RESULT_TIMEOUT, in generateDeviceImages()
242 return receiver.getOutput().contains("OK "); in generateDeviceImages()
/cts/tests/netlegacy22.api/src/android/net/cts/legacy/api22/
DConnectivityManagerLegacyTest.java223 BroadcastReceiver receiver = new BroadcastReceiver() { in expectNetworkBroadcast() local
236 mContext.registerReceiver(receiver, filter); in expectNetworkBroadcast()
244 mContext.unregisterReceiver(receiver); in expectNetworkBroadcast()
/cts/tests/tests/media/src/android/media/cts/
DMidiSoloTest.java116 MidiReceiver receiver = new MidiReceiver() { in testMidiReceiver() local
123 receiver.getMaxMessageSize()); in testMidiReceiver()
/cts/hostsidetests/appsecurity/test-apps/EncryptionApp/src/com/android/cts/encryptionapp/
DEncryptionAppTest.java199 final BroadcastReceiver receiver = new BroadcastReceiver() { in testVerifyLockedAndDismiss() local
205 mDe.registerReceiver(receiver, new IntentFilter(Intent.ACTION_USER_UNLOCKED)); in testVerifyLockedAndDismiss()

12