Home
last modified time | relevance | path

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

123

/cts/hostsidetests/monkey/src/com/android/cts/monkey/
DCategoryTest.java29 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in testDefaultCategories() local
31 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testDefaultCategories()
32 String out = receiver.getOutput(); in testDefaultCategories()
36 receiver.cancel(); in testDefaultCategories()
37 receiver.clearBuffer(); in testDefaultCategories()
38 receiver = null; in testDefaultCategories()
45 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in testSingleCategory() local
47 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testSingleCategory()
48 String out = receiver.getOutput(); in testSingleCategory()
52 receiver.cancel(); in testSingleCategory()
[all …]
DPackageTest.java38 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in testSinglePackage() local
40 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testSinglePackage()
41 String out = receiver.getOutput(); in testSinglePackage()
46 receiver.cancel(); in testSinglePackage()
47 receiver.clearBuffer(); in testSinglePackage()
48 receiver = null; in testSinglePackage()
68 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in testMultiplePackages() local
70 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testMultiplePackages()
71 String out = receiver.getOutput(); in testMultiplePackages()
76 receiver.cancel(); in testMultiplePackages()
[all …]
/cts/tests/tests/permission2/src/android/permission2/cts/
DNoReceiveSmsPermissionTest.java71 IllegalSmsReceiver receiver = new IllegalSmsReceiver(); in testReceiveTextMessage() local
77 getContext().registerReceiver(receiver, filter); in testReceiveTextMessage()
79 synchronized(receiver) { in testReceiveTextMessage()
81 receiver.wait(WAIT_TIME); in testReceiveTextMessage()
88 receiver.isMessageSent()); in testReceiveTextMessage()
89 assertFalse("Sms received without proper permissions", receiver.isSmsReceived()); in testReceiveTextMessage()
103 AppSpecificSmsReceiver receiver = new AppSpecificSmsReceiver(); in testAppSpecificSmsToken() local
109 getContext().registerReceiver(receiver, filter); in testAppSpecificSmsToken()
117 synchronized(receiver) { in testAppSpecificSmsToken()
119 receiver.wait(WAIT_TIME); in testAppSpecificSmsToken()
[all …]
/cts/tests/app/src/android/app/cts/
DDownloadManagerTest.java74 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManager() local
77 mContext.registerReceiver(receiver, intentFilter); in testDownloadManager()
88 receiver.waitForDownloadComplete(SHORT_TIMEOUT, goodId, badId); in testDownloadManager()
96 mContext.unregisterReceiver(receiver); in testDownloadManager()
101 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerSupportsHttp() local
104 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerSupportsHttp()
112 receiver.waitForDownloadComplete(SHORT_TIMEOUT, id); in testDownloadManagerSupportsHttp()
118 mContext.unregisterReceiver(receiver); in testDownloadManagerSupportsHttp()
132 final DownloadCompleteReceiver receiver = new DownloadCompleteReceiver(); in testDownloadManagerSupportsHttpWithExternalWebServer() local
135 mContext.registerReceiver(receiver, intentFilter); in testDownloadManagerSupportsHttpWithExternalWebServer()
[all …]
DNewDocumentTest.java40 try (final Receiver receiver = new Receiver(NewDocumentTestActivity.NOTIFY_RESUME)) { in testNewDocument() argument
42 receiver.await(); in testNewDocument()
45 try (final Receiver receiver = new Receiver(NewDocumentTestActivity.NOTIFY_NEW_INTENT)) { in testNewDocument() argument
47 receiver.await(); in testNewDocument()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DSanityTest.java57 BlockingBroadcastReceiver receiver = in testLaunchAppInstalledInProfileOnly() local
60 receiver.register(); in testLaunchAppInstalledInProfileOnly()
67 Intent receivedBroadcast = receiver.awaitForBroadcast(); in testLaunchAppInstalledInProfileOnly()
71 receiver.unregisterQuietly(); in testLaunchAppInstalledInProfileOnly()
/cts/hostsidetests/security/src/android/security/cts/
DAdbUtils.java71 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in runPoc() local
72 … device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, TimeUnit.SECONDS, 0); in runPoc()
73 String output = receiver.getOutput(); in runPoc()
87 NullOutputReceiver receiver = new NullOutputReceiver(); in runPocNoOutput() local
88 device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, in runPocNoOutput()
209 CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in runPocCheckExitCode() local
211 receiver, timeout, TimeUnit.SECONDS, 0); in runPocCheckExitCode()
217 returnStr = receiver.getOutput().replaceAll("[^0-9]", ""); in runPocCheckExitCode()
/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/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DSetTimeTest.java60 BroadcastReceiver receiver = new BroadcastReceiver() { in testSetTimeWithValue() local
66 mContext.registerReceiver(receiver, new IntentFilter(Intent.ACTION_TIME_CHANGED)); in testSetTimeWithValue()
75 mContext.unregisterReceiver(receiver); in testSetTimeWithValue()
92 final BroadcastReceiver receiver = new BroadcastReceiver() { in testSetTimeZoneWithValue() local
100 mContext.registerReceiver(receiver, new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED)); in testSetTimeZoneWithValue()
117 mContext.unregisterReceiver(receiver); in testSetTimeZoneWithValue()
DAirplaneModeRestrictionTest.java55 BroadcastReceiver receiver = new BroadcastReceiver() { in testAirplaneModeTurnedOffWhenRestrictionSet() local
62 mContext.registerReceiver(receiver, new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED)); in testAirplaneModeTurnedOffWhenRestrictionSet()
72 mContext.unregisterReceiver(receiver); in testAirplaneModeTurnedOffWhenRestrictionSet()
/cts/tests/tests/net/src/android/net/wifi/rtt/cts/
DTestBase.java101 WifiRttBroadcastReceiver receiver = new WifiRttBroadcastReceiver(); in setUp() local
102 mContext.registerReceiver(receiver, intentFilter); in setUp()
105 receiver.waitForStateChange()); in setUp()
199 WifiScansBroadcastReceiver receiver = new WifiScansBroadcastReceiver(); in scanAps() local
200 mContext.registerReceiver(receiver, intentFilter); in scanAps()
203 receiver.waitForStateChange(); in scanAps()
204 mContext.unregisterReceiver(receiver); in scanAps()
/cts/hostsidetests/incident/src/com/android/server/cts/
DProtoDumpTestCase.java100 final CollectingByteOutputReceiver receiver = new CollectingByteOutputReceiver(); in getDump() local
101 getDevice().executeShellCommand(command, receiver); in getDump()
102 return parser.parseFrom(receiver.getOutput()); in getDump()
174 final CollectingOutputReceiver receiver = new CollectingOutputReceiver(); in execCommandAndGet() local
175 getDevice().executeShellCommand(command, receiver); in execCommandAndGet()
176 return receiver.getOutput(); in execCommandAndGet()
217 IShellOutputReceiver receiver = new IShellOutputReceiver() { in checkLogcatForText() local
262 receiver, maxTimeMs, TimeUnit.MILLISECONDS, 0); in checkLogcatForText()
263 return receiver.isCancelled(); in checkLogcatForText()
/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/JobScheduler/src/android/jobscheduler/cts/
DConnectivityConstraintTest.java104 ConnectivityActionReceiver receiver = in tearDown() local
109 mContext.registerReceiver(receiver, filter); in tearDown()
112 receiver.waitForStateChange(); in tearDown()
116 mContext.unregisterReceiver(receiver); in tearDown()
289 ConnectivityActionReceiver receiver = in connectToWiFi() local
294 mContext.registerReceiver(receiver, filter); in connectToWiFi()
298 receiver.waitForStateChange()); in connectToWiFi()
300 mContext.unregisterReceiver(receiver); in connectToWiFi()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAssistScreenCaptureDisabledTest.java83 BlockingBroadcastReceiver receiver = new BlockingBroadcastReceiver( in assertScreenCapturePossible() local
86 receiver.register(); in assertScreenCapturePossible()
93 screenShotIntent = receiver.awaitForBroadcast(); in assertScreenCapturePossible()
99 receiver.unregisterQuietly(); in assertScreenCapturePossible()
DFbeHelper.java64 final BroadcastReceiver receiver = new BroadcastReceiver() { in testUnlockFbe() local
70 mContext.registerReceiver(receiver, new IntentFilter(Intent.ACTION_USER_UNLOCKED)); in testUnlockFbe()
/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.java85 Object receiver = null; in loadAndRun() local
88 receiver = c.newInstance(); in loadAndRun()
95 method.invoke(receiver, args); in loadAndRun()
/cts/hostsidetests/devicepolicy/app/LauncherTests/src/com/android/cts/launchertests/
DQuietModeTest.java140 BlockingBroadcastReceiver receiver = in trySetQuietModeEnabled() local
143 receiver.register(); in trySetQuietModeEnabled()
148 return receiver.awaitForBroadcast(); in trySetQuietModeEnabled()
150 receiver.unregisterQuietly(); in trySetQuietModeEnabled()
/cts/hostsidetests/statsd/apps/statsdapp/src/com/android/server/cts/device/statsd/
DAtomTests.java365 BroadcastReceiver receiver = in testWakeupAlarm() local
371 waitForReceiver(context, 10_000, onReceiveLatch, receiver); in testWakeupAlarm()
406 BroadcastReceiver receiver = registerReceiver(context, onReceiveLatch, intentFilter); in testWifiScan() local
408 waitForReceiver(context, 60_000, onReceiveLatch, receiver); in testWifiScan()
435 BroadcastReceiver receiver = new BroadcastReceiver() { in registerReceiver() local
447 ctx.registerReceiver(receiver, intentFilter, null, handler); in registerReceiver()
448 return receiver; in registerReceiver()
456 int maxWaitTimeMs, CountDownLatch latch, BroadcastReceiver receiver) { in waitForReceiver() argument
469 if (ctx != null && receiver != null) { in waitForReceiver()
470 ctx.unregisterReceiver(receiver); in waitForReceiver()
/cts/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/src/com/android/cts/transferowner/
DDeviceAndProfileOwnerTransferOutgoingTest.java116 BlockingBroadcastReceiver receiver = new BlockingBroadcastReceiver(mContext, in testTransferOwnershipChangedBroadcast() local
119 receiver.register(); in testTransferOwnershipChangedBroadcast()
123 Intent intent = receiver.awaitForBroadcast(); in testTransferOwnershipChangedBroadcast()
126 receiver.unregisterQuietly(); in testTransferOwnershipChangedBroadcast()
/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()
132 receiver.waitForDownloadComplete(30 * DateUtils.SECOND_IN_MILLIS, id); in testDownloadManagerPackage()
138 mContext.unregisterReceiver(receiver); in testDownloadManagerPackage()
/cts/tests/tests/content/src/android/content/cts/
DContextWrapperTest.java119 for (BroadcastReceiver receiver : mRegisteredReceiverList) { in tearDown()
120 mContextWrapper.unregisterReceiver(receiver); in tearDown()
126 private void registerBroadcastReceiver(BroadcastReceiver receiver, IntentFilter filter) { in registerBroadcastReceiver() argument
127 mContextWrapper.registerReceiver(receiver, filter); in registerBroadcastReceiver()
129 mRegisteredReceiverList.add(receiver); in registerBroadcastReceiver()
703 final ResultReceiver receiver = new ResultReceiver(); in testSendBroadcast1() local
705 registerBroadcastReceiver(receiver, new IntentFilter(ResultReceiver.MOCK_ACTION)); in testSendBroadcast1()
712 return receiver.hasReceivedBroadCast(); in testSendBroadcast1()
718 final ResultReceiver receiver = new ResultReceiver(); in testSendBroadcast2() local
720 registerBroadcastReceiver(receiver, new IntentFilter(ResultReceiver.MOCK_ACTION)); in testSendBroadcast2()
[all …]
/cts/hostsidetests/statsd/src/android/cts/statsd/atom/
DBaseTestCase.java75 final CollectingByteOutputReceiver receiver = new CollectingByteOutputReceiver(); in getDump() local
76 getDevice().executeShellCommand(command, receiver); in getDump()
77 return parser.parseFrom(receiver.getOutput()); in getDump()
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/
DAlarmOperation.java82 BroadcastReceiver receiver = new BroadcastReceiver() { in execute() local
88 mContext.registerReceiver(receiver, intentFilter); in execute()

123