Home
last modified time | relevance | path

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

/cts/tests/tests/app/src/android/app/cts/
DDownloadManagerTest.java69 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManager() local
72 mContext.registerReceiver(receiver, intentFilter); in testDownloadManager()
83 receiver.waitForDownloadComplete(SHORT_TIMEOUT, goodId, badId); in testDownloadManager()
91 mContext.unregisterReceiver(receiver); in testDownloadManager()
96 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerSupportsHttp() local
99 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerSupportsHttp()
107 receiver.waitForDownloadComplete(SHORT_TIMEOUT, id); in testDownloadManagerSupportsHttp()
113 mContext.unregisterReceiver(receiver); in testDownloadManagerSupportsHttp()
122 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerSupportsHttpWithExternalWebServer() local
125 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerSupportsHttpWithExternalWebServer()
[all …]
DActivityManagerTest.java158 ActivityReceiverFilter receiver = new ActivityReceiverFilter(ACTIVITY_LAUNCHED_ACTION);
162 assertEquals(RESULT_PASS, receiver.waitForActivity());
163 receiver.close();
/cts/tests/tests/midi/src/android/midi/cts/
DMidiEchoTest.java325 MyLoggingReceiver receiver = new MyLoggingReceiver(); in testEchoSmallMessage() local
326 mc.echoOutputPort.connect(receiver); in testEchoSmallMessage()
338 synchronized (receiver) { in testEchoSmallMessage()
339 receiver.waitForMessages(numMessages, timeoutMs); in testEchoSmallMessage()
341 assertEquals("number of messages.", numMessages, receiver.getMessageCount()); in testEchoSmallMessage()
342 MidiMessage message = receiver.getMessage(0); in testEchoSmallMessage()
352 mc.echoOutputPort.disconnect(receiver); in testEchoSmallMessage()
363 MyLoggingReceiver receiver = new MyLoggingReceiver(); in testEchoLatency() local
364 mc.echoOutputPort.connect(receiver); in testEchoLatency()
378 synchronized (receiver) { in testEchoLatency()
[all …]
/cts/tests/tests/permission2/src/android/permission2/cts/
DNoReceiveSmsPermissionTest.java65 IllegalSmsReceiver receiver = new IllegalSmsReceiver(); in testReceiveTextMessage() local
71 getContext().registerReceiver(receiver, filter); in testReceiveTextMessage()
73 synchronized(receiver) { in testReceiveTextMessage()
75 receiver.wait(WAIT_TIME); in testReceiveTextMessage()
82 receiver.isMessageSent()); in testReceiveTextMessage()
83 assertFalse("Sms received without proper permissions", receiver.isSmsReceived()); in testReceiveTextMessage()
/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/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/net/src/android/net/cts/
DConnectivityManagerTest.java311 ConnectivityActionReceiver receiver = new ConnectivityActionReceiver( in testRegisterNetworkCallback_withPendingIntent() local
313 mContext.registerReceiver(receiver, filter); in testRegisterNetworkCallback_withPendingIntent()
338 receiver.waitForState()); in testRegisterNetworkCallback_withPendingIntent()
344 mContext.unregisterReceiver(receiver); in testRegisterNetworkCallback_withPendingIntent()
355 ConnectivityActionReceiver receiver = new ConnectivityActionReceiver( in connectToWifi() local
359 mContext.registerReceiver(receiver, filter); in connectToWifi()
364 connected = receiver.waitForState(); in connectToWifi()
368 mContext.unregisterReceiver(receiver); in connectToWifi()
377 ConnectivityActionReceiver receiver = new ConnectivityActionReceiver( in disconnectFromWifi() local
381 mContext.registerReceiver(receiver, filter); in disconnectFromWifi()
[all …]
/cts/tests/tests/view/src/android/view/inputmethod/cts/
DInputMethodManagerTest.java116 ResultReceiver receiver = new ResultReceiver(handler); in testInputMethodManager()
117 assertTrue(imManager.showSoftInput(view, 0, receiver)); in testInputMethodManager()
118 receiver = new ResultReceiver(handler); in testInputMethodManager()
119 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/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()
650 final ResultReceiver receiver = new ResultReceiver(); in testSendBroadcast1() local
652 registerBroadcastReceiver(receiver, new IntentFilter(ResultReceiver.MOCK_ACTION)); in testSendBroadcast1()
659 return receiver.hasReceivedBroadCast(); in testSendBroadcast1()
665 final ResultReceiver receiver = new ResultReceiver(); in testSendBroadcast2() local
667 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/JobScheduler/src/android/jobscheduler/cts/
DConnectivityConstraintTest.java200 ConnectivityActionReceiver receiver = in connectToWiFi() local
205 mContext.registerReceiver(receiver, filter); in connectToWiFi()
209 receiver.waitForStateChange()); in connectToWiFi()
211 mContext.unregisterReceiver(receiver); in connectToWiFi()
/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/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/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java141 private final BroadcastReceiver receiver = new BroadcastReceiver() { field in DelegatedCertInstallerTest
164 mContext.registerReceiver(receiver, filter); in setUp()
169 mContext.unregisterReceiver(receiver); in tearDown()
/cts/tests/tests/netlegacy22/api/src/android/net/cts/legacy/api22/
DConnectivityManagerLegacyTest.java185 BroadcastReceiver receiver = new BroadcastReceiver() { in expectNetworkBroadcast() local
198 mContext.registerReceiver(receiver, filter); in expectNetworkBroadcast()
206 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/tools/tradefed-host/tests/src/com/android/cts/tradefed/testtype/
DDeqpTestRunnerTest.java269 IShellOutputReceiver receiver in expectRenderConfigQueryAndReturn()
272 receiver.addOutput(queryOutput.getBytes(), 0, queryOutput.length()); in expectRenderConfigQueryAndReturn()
273 receiver.flush(); in expectRenderConfigQueryAndReturn()
1746 IShellOutputReceiver receiver in testMultipleInstancesLossOfDeviceMidInstance()
1749 receiver.addOutput(instrumentationAnswerCrash.getBytes(), 0, in testMultipleInstancesLossOfDeviceMidInstance()
2340 IShellOutputReceiver receiver in runInstrumentationLineAndAnswer()
2343 receiver.addOutput(output.getBytes(), 0, output.length()); in runInstrumentationLineAndAnswer()
2344 receiver.flush(); in runInstrumentationLineAndAnswer()
/cts/tools/tradefed-host/src/com/android/cts/tradefed/testtype/
DDeqpTestRunner.java1332 final IShellOutputReceiver receiver) in executeShellCommandAndReadOutput() argument
1335 mDevice.getIDevice().executeShellCommand(command, receiver, in executeShellCommandAndReadOutput()