/cts/hostsidetests/monkey/src/com/android/cts/monkey/ |
D | CategoryTest.java | 29 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 …]
|
D | PackageTest.java | 38 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/ |
D | NoReceiveSmsPermissionTest.java | 71 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/ |
D | DownloadManagerTest.java | 74 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 …]
|
D | NewDocumentTest.java | 40 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/ |
D | SanityTest.java | 57 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/ |
D | AdbUtils.java | 71 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/ |
D | MidiEchoTest.java | 337 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/ |
D | SetTimeTest.java | 60 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()
|
D | AirplaneModeRestrictionTest.java | 55 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/ |
D | TestBase.java | 101 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/ |
D | ProtoDumpTestCase.java | 100 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/ |
D | ResultReceiverTest.java | 39 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/ |
D | ConnectivityConstraintTest.java | 104 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/ |
D | AssistScreenCaptureDisabledTest.java | 83 BlockingBroadcastReceiver receiver = new BlockingBroadcastReceiver( in assertScreenCapturePossible() local 86 receiver.register(); in assertScreenCapturePossible() 93 screenShotIntent = receiver.awaitForBroadcast(); in assertScreenCapturePossible() 99 receiver.unregisterQuietly(); in assertScreenCapturePossible()
|
D | FbeHelper.java | 64 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/ |
D | DxTestCase.java | 82 Object receiver = null; in loadAndRun() local 85 receiver = c.newInstance(); in loadAndRun() 92 method.invoke(receiver, args); in loadAndRun()
|
D | DxAbstractMain.java | 85 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/ |
D | QuietModeTest.java | 140 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/ |
D | AtomTests.java | 365 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/ |
D | DeviceAndProfileOwnerTransferOutgoingTest.java | 116 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/ |
D | ExternalStorageTest.java | 121 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/ |
D | ContextWrapperTest.java | 119 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/ |
D | BaseTestCase.java | 75 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/ |
D | AlarmOperation.java | 82 BroadcastReceiver receiver = new BroadcastReceiver() { in execute() local 88 mContext.registerReceiver(receiver, intentFilter); in execute()
|