Home
last modified time | relevance | path

Searched refs:runOnMainThread (Results 1 – 8 of 8) sorted by relevance

/cts/tests/tests/print/src/android/print/cts/
DPrinterDiscoverySessionLifecycleTest.java20 import static android.print.test.Utils.runOnMainThread;
114 runOnMainThread(() -> addPrinter(localPrinterId, true)); in makeDefaultPrinter()
174 runOnMainThread(() -> addPrinter(FIRST_PRINTER_LOCAL_ID, true)); in defaultPrinterBecomesAvailableWhileInBackground()
220 runOnMainThread(() -> addPrinter(FIRST_PRINTER_LOCAL_ID, false)); in defaultPrinterBecomesUsableWhileInBackground()
228 runOnMainThread(() -> addPrinter(FIRST_PRINTER_LOCAL_ID, true)); in defaultPrinterBecomesUsableWhileInBackground()
273 runOnMainThread(() -> { in normalLifecycle() method
278 runOnMainThread(() -> assertFalse(sSession.isDestroyed())); in normalLifecycle()
279 runOnMainThread(() -> assertEquals(0, sSession.getTrackedPrinters().size())); in normalLifecycle()
284 eventually(() -> runOnMainThread(() -> assertEquals(FIRST_PRINTER_LOCAL_ID, in normalLifecycle()
286 runOnMainThread(() -> assertTrue(sSession.isPrinterDiscoveryStarted())); in normalLifecycle()
[all …]
DPrintServicesTest.java22 import static android.print.test.Utils.runOnMainThread;
166 runOnMainThread(() -> printProgress[0] = sPrintJob.getInfo().getProgress()); in getProgress()
181 runOnMainThread(() -> printStatus[0] = sPrintJob.getInfo().getStatus(getActivity() in getStatus()
211 runOnMainThread(() -> { in setProgressAndStatus() method
305 runOnMainThread(sPrintJob::complete);
340 runOnMainThread(() -> {
491 runOnMainThread(() -> pm.print("job1", adapter, null));
501 runOnMainThread(() -> assertEquals(0, firstService.callGetActivePrintJobs().size()));
510 eventually(() -> runOnMainThread(
515 runOnMainThread(() -> pm.print("job2", adapter, null));
[all …]
DInteractionBetweenPrintDocumentAndPrinterDiscovery.java23 import static android.print.test.Utils.runOnMainThread;
165 runOnMainThread(() -> addPrinter(session[0], STATUS_UNAVAILABLE)); in printerReappearsWhileCanceling()
172 runOnMainThread(() -> addPrinter(session[0], STATUS_IDLE)); in printerReappearsWhileCanceling()
DPrinterCapabilitiesChangeTest.java19 import static android.print.test.Utils.runOnMainThread;
151 runOnMainThread( in changeCapabilities()
/cts/tests/tests/media/session/src/android/media/session/cts/
DMediaBrowserTest.java111 runOnMainThread(() -> assertThat(mMediaBrowser.isConnected()).isFalse()); in testMediaBrowser()
114 runOnMainThread(() -> assertThat(mMediaBrowser.isConnected()).isTrue()); in testMediaBrowser()
116 runOnMainThread(() -> { in testMediaBrowser() method
128 runOnMainThread(() -> new PollingCheck(TIME_OUT_MS) { in testMediaBrowser()
141 runOnMainThread(() -> assertThat(mMediaBrowser.isConnected()).isFalse()); in testThrowingISEWhileNotConnected()
143 runOnMainThread(() -> { in testThrowingISEWhileNotConnected() method
164 runOnMainThread(() -> { in testConnectTwice() method
176 runOnMainThread(() -> mMediaBrowser.connect()); in testConnectionFailed()
193 runOnMainThread(() -> { in testReconnection() method
203 runOnMainThread(() -> mMediaBrowser.subscribe(StubMediaBrowserService.MEDIA_ID_ROOT, in testReconnection()
[all …]
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/services/
DCtsBasicVoiceInteractionService.java152 boolean runOnMainThread) { in createAlwaysOnHotwordDetectorNoHotwordDetectionService() argument
158 final Handler handler = runOnMainThread ? new Handler(Looper.getMainLooper()) : mHandler; in createAlwaysOnHotwordDetectorNoHotwordDetectionService()
182 public void createAlwaysOnHotwordDetector(boolean useExecutor, boolean runOnMainThread) { in createAlwaysOnHotwordDetector() argument
183 createAlwaysOnHotwordDetector(useExecutor, runOnMainThread, /* options= */ null); in createAlwaysOnHotwordDetector()
191 public void createAlwaysOnHotwordDetector(boolean useExecutor, boolean runOnMainThread, in createAlwaysOnHotwordDetector() argument
268 final Handler handler = runOnMainThread ? new Handler(Looper.getMainLooper()) : mHandler; in createAlwaysOnHotwordDetector()
327 boolean runOnMainThread) { in createAlwaysOnHotwordDetectorWithOnFailureCallback() argument
328 createAlwaysOnHotwordDetectorWithOnFailureCallback(useExecutor, runOnMainThread, in createAlwaysOnHotwordDetectorWithOnFailureCallback()
337 boolean runOnMainThread, @Nullable PersistableBundle options) { in createAlwaysOnHotwordDetectorWithOnFailureCallback() argument
341 final Handler handler = runOnMainThread ? new Handler(Looper.getMainLooper()) : mHandler; in createAlwaysOnHotwordDetectorWithOnFailureCallback()
[all …]
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DVoiceInteractionServiceTest.java399 boolean runOnMainThread, boolean callbackShouldRunOnMainThread) throws Exception { in testCreateAlwaysOnHotwordDetectorNoHotwordDetectionService() argument
406 runOnMainThread); in testCreateAlwaysOnHotwordDetectorNoHotwordDetectionService()
446 private void testCreateAlwaysOnHotwordDetector(boolean useExecutor, boolean runOnMainThread, in testCreateAlwaysOnHotwordDetector() argument
452 mService.createAlwaysOnHotwordDetector(useExecutor, runOnMainThread); in testCreateAlwaysOnHotwordDetector()
526 private void testCreateHotwordDetector(boolean useExecutor, boolean runOnMainThread, in testCreateHotwordDetector() argument
532 mService.createSoftwareHotwordDetector(useExecutor, runOnMainThread); in testCreateHotwordDetector()
/cts/tests/tests/print/printTestUtilLib/src/android/print/test/
DUtils.java80 public static void runOnMainThread(@NonNull final Invokable r) throws Throwable { in runOnMainThread() method in Utils