/aosp_15_r20/external/robolectric/robolectric/src/test/java/org/robolectric/shadows/ |
H A D | ShadowHandlerThreadTest.java | 22 private HandlerThread handlerThread; field in ShadowHandlerThreadTest 27 if (handlerThread != null) { in tearDown() 28 handlerThread.quit(); in tearDown() 29 handlerThread.join(); in tearDown() 35 handlerThread = new HandlerThread("test"); in shouldReturnLooper() 36 handlerThread.start(); in shouldReturnLooper() 37 assertNotNull(handlerThread.getLooper()); in shouldReturnLooper() 39 handlerThread.getLooper(), ApplicationProvider.getApplicationContext().getMainLooper()); in shouldReturnLooper() 44 handlerThread = new HandlerThread("test"); in shouldReturnNullIfThreadHasNotBeenStarted() 45 assertNull(handlerThread.getLooper()); in shouldReturnNullIfThreadHasNotBeenStarted() [all …]
|
H A D | ShadowLooperResetterTest.java | 153 static HandlerThread handlerThread; field in ShadowLooperResetterTest.DelayedTaskRunningLooperTest 157 if (handlerThread == null) { in init() 158 handlerThread = new HandlerThread("DelayedTaskRunningLooperTest"); in init() 159 handlerThread.start(); in init() 165 handlerThread.quit(); in shutDown() 166 handlerThread.join(); in shutDown() 170 checkNotNull(handlerThread.getLooper()); in doDelayedPostToLooperTest() 173 new Handler(handlerThread.getLooper()).postDelayed(() -> didRun.set(true), 100); in doDelayedPostToLooperTest() 174 shadowOf(handlerThread.getLooper()).idle(); in doDelayedPostToLooperTest() 176 shadowOf(handlerThread.getLooper()).idleFor(Duration.ofMillis(100)); in doDelayedPostToLooperTest() [all …]
|
H A D | ShadowPausedLooperTest.java | 56 private HandlerThread handlerThread; field in ShadowPausedLooperTest 60 handlerThread = new HandlerThread(testName.getMethodName()); in createHandlerThread() 61 handlerThread.start(); in createHandlerThread() 66 handlerThread.quit(); in quitHandlerThread() 67 handlerThread.join(); in quitHandlerThread() 72 Looper looper = handlerThread.getLooper(); in mainLooper_getAllLoopers_shouldContainMainAndHandlerThread() 85 assertThat(handlerThread.getLooper()).isNotSameInstanceAs(getMainLooper()); in differentThreads_getDifferentLoopers() 86 handlerThread.quit(); in differentThreads_getDifferentLoopers() 110 Handler handler = new Handler(handlerThread.getLooper()); in postedBackgroundLooperTasksAreExecuted() 112 ShadowPausedLooper shadowLooper = Shadow.extract(handlerThread.getLooper()); in postedBackgroundLooperTasksAreExecuted() [all …]
|
/aosp_15_r20/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/pbap/ |
D | BluetoothPbapUtilsTest.java | 176 HandlerThread handlerThread = new HandlerThread("BluetoothPbapUtilsTest"); in fetchAndSetContacts_whenCursorIsNull_returnsMinusOne() local 177 handlerThread.start(); in fetchAndSetContacts_whenCursorIsNull_returnsMinusOne() 178 Handler handler = new Handler(handlerThread.getLooper()); in fetchAndSetContacts_whenCursorIsNull_returnsMinusOne() 186 handlerThread.quit(); in fetchAndSetContacts_whenCursorIsNull_returnsMinusOne() 202 HandlerThread handlerThread = new HandlerThread("BluetoothPbapUtilsTest"); in fetchAndSetContacts_whenIsLoadTrue_returnsContactsSetSize() local 203 handlerThread.start(); in fetchAndSetContacts_whenIsLoadTrue_returnsContactsSetSize() 204 Handler handler = new Handler(handlerThread.getLooper()); in fetchAndSetContacts_whenIsLoadTrue_returnsContactsSetSize() 213 handlerThread.quit(); in fetchAndSetContacts_whenIsLoadTrue_returnsContactsSetSize() 229 HandlerThread handlerThread = new HandlerThread("BluetoothPbapUtilsTest"); in fetchAndSetContacts_whenIsLoadFalse_returnsContactsSetSize() local 230 handlerThread.start(); in fetchAndSetContacts_whenIsLoadFalse_returnsContactsSetSize() [all …]
|
/aosp_15_r20/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/testutils/src/test/java/com/google/android/exoplayer2/testutil/ |
H A D | FakeClockTest.java | 74 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_obtainMessageSendToTarget_triggersMessage() local 75 handlerThread.start(); in createHandler_obtainMessageSendToTarget_triggersMessage() 78 HandlerWrapper handler = fakeClock.createHandler(handlerThread.getLooper(), callback); in createHandler_obtainMessageSendToTarget_triggersMessage() 101 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_sendEmptyMessage_triggersMessageAtCorrectTime() local 102 handlerThread.start(); in createHandler_sendEmptyMessage_triggersMessageAtCorrectTime() 105 HandlerWrapper handler = fakeClock.createHandler(handlerThread.getLooper(), callback); in createHandler_sendEmptyMessage_triggersMessageAtCorrectTime() 137 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_sendMessageAtFrontOfQueue_sendsMessageFirst() local 138 handlerThread.start(); in createHandler_sendMessageAtFrontOfQueue_sendsMessageFirst() 141 HandlerWrapper handler = fakeClock.createHandler(handlerThread.getLooper(), callback); in createHandler_sendMessageAtFrontOfQueue_sendsMessageFirst() 161 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_postDelayed_triggersMessagesUpToCurrentTime() local [all …]
|
/aosp_15_r20/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/testutils/src/test/java/com/google/android/exoplayer2/testutil/ |
H A D | FakeClockTest.java | 74 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_obtainMessageSendToTarget_triggersMessage() local 75 handlerThread.start(); in createHandler_obtainMessageSendToTarget_triggersMessage() 78 HandlerWrapper handler = fakeClock.createHandler(handlerThread.getLooper(), callback); in createHandler_obtainMessageSendToTarget_triggersMessage() 101 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_sendEmptyMessage_triggersMessageAtCorrectTime() local 102 handlerThread.start(); in createHandler_sendEmptyMessage_triggersMessageAtCorrectTime() 105 HandlerWrapper handler = fakeClock.createHandler(handlerThread.getLooper(), callback); in createHandler_sendEmptyMessage_triggersMessageAtCorrectTime() 137 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_sendMessageAtFrontOfQueue_sendsMessageFirst() local 138 handlerThread.start(); in createHandler_sendMessageAtFrontOfQueue_sendsMessageFirst() 141 HandlerWrapper handler = fakeClock.createHandler(handlerThread.getLooper(), callback); in createHandler_sendMessageAtFrontOfQueue_sendsMessageFirst() 161 HandlerThread handlerThread = new HandlerThread("FakeClockTest"); in createHandler_postDelayed_triggersMessagesUpToCurrentTime() local [all …]
|
/aosp_15_r20/cts/tests/tests/telephony/current/LocationAccessingApp/src/android/telephony/cts/locationaccessingapp/ |
H A D | CtsLocationAccessService.java | 104 HandlerThread handlerThread = new HandlerThread("Telephony location CTS"); in listenForCellInfo() local 105 handlerThread.start(); in listenForCellInfo() 106 Executor executor = new Handler(handlerThread.getLooper())::post; in listenForCellInfo() 122 handlerThread.quit(); in listenForCellInfo() 128 HandlerThread handlerThread = new HandlerThread("Telephony location CTS"); in listenForCellLocation() local 129 handlerThread.start(); in listenForCellLocation() 130 Executor executor = new Handler(handlerThread.getLooper())::post; in listenForCellLocation() 146 handlerThread.quit(); in listenForCellLocation() 152 HandlerThread handlerThread = new HandlerThread("Telephony location CTS"); in listenForServiceState() local 153 handlerThread.start(); in listenForServiceState() [all …]
|
/aosp_15_r20/external/robolectric/integration_tests/androidx_test/src/test/java/org/robolectric/integrationtests/axt/ |
H A D | EspressoIdlingResourceTest.java | 121 HandlerThread handlerThread = new HandlerThread("Test"); in onIdle_looperIsIdle() local 123 handlerThread.start(); in onIdle_looperIsIdle() 124 Handler handler = new Handler(handlerThread.getLooper()); in onIdle_looperIsIdle() 137 idlingRegistry.registerLooperAsIdlingResource(handlerThread.getLooper()); in onIdle_looperIsIdle() 145 handlerThread.quit(); in onIdle_looperIsIdle() 153 HandlerThread handlerThread = new HandlerThread("Test"); in onIdle_looperPostsToMainThread_shouldWaitForTheTaskOnMainThreadToFinish() local 155 handlerThread.start(); in onIdle_looperPostsToMainThread_shouldWaitForTheTaskOnMainThreadToFinish() 156 Handler handler = new Handler(handlerThread.getLooper()); in onIdle_looperPostsToMainThread_shouldWaitForTheTaskOnMainThreadToFinish() 171 idlingRegistry.registerLooperAsIdlingResource(handlerThread.getLooper()); in onIdle_looperPostsToMainThread_shouldWaitForTheTaskOnMainThreadToFinish() 178 handlerThread.quit(); in onIdle_looperPostsToMainThread_shouldWaitForTheTaskOnMainThreadToFinish()
|
/aosp_15_r20/frameworks/base/services/tests/wmtests/src/com/android/server/policy/ |
H A D | SingleKeyGestureTests.java | 308 final HandlerThread handlerThread = in testShortPress_Pressure() local 310 handlerThread.start(); in testShortPress_Pressure() 311 Handler newHandler = new Handler(handlerThread.getLooper()); in testShortPress_Pressure() 326 handlerThread.quitSafely(); in testShortPress_Pressure() 332 final HandlerThread handlerThread = in testMultiPress_Pressure() local 334 handlerThread.start(); in testMultiPress_Pressure() 335 Handler newHandler = new Handler(handlerThread.getLooper()); in testMultiPress_Pressure() 354 handlerThread.quitSafely(); in testMultiPress_Pressure() 360 final HandlerThread handlerThread = in testOnKeyUp_Pressure() local 362 handlerThread.start(); in testOnKeyUp_Pressure() [all …]
|
/aosp_15_r20/packages/apps/Dialer/java/com/android/incallui/ |
D | RttCallPresenter.java | 44 private HandlerThread handlerThread; field in RttCallPresenter 121 if (handlerThread != null && handlerThread.isAlive()) { in startListenOnRemoteMessage() 125 handlerThread = new HandlerThread("RttCallRemoteMessageHandler"); in startListenOnRemoteMessage() 126 handlerThread.start(); in startListenOnRemoteMessage() 128 new RemoteMessageHandler(handlerThread.getLooper(), rttCall, rttCallScreen); in startListenOnRemoteMessage() 133 if (handlerThread != null && handlerThread.isAlive()) { in stopListenOnRemoteMessage() 134 handlerThread.quit(); in stopListenOnRemoteMessage()
|
/aosp_15_r20/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/pbapclient/ |
D | PbapClientStateMachineOld.java | 169 HandlerThread handlerThread = in enter() local 171 handlerThread.start(); in enter() 172 Looper looper = handlerThread.getLooper(); in enter() 185 mHandlerThread = handlerThread; in enter() 249 HandlerThread handlerThread = mHandlerThread; in processMessage() local 254 if (handlerThread != null) { in processMessage() 255 handlerThread.quitSafely(); in processMessage() 269 if (handlerThread != null) { in processMessage() 270 handlerThread.quitSafely(); in processMessage() 382 HandlerThread handlerThread = mHandlerThread; in doQuit() local [all …]
|
/aosp_15_r20/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/testutils/ |
D | HandlerUtilsTest.kt | 36 val handlerThread = HandlerThread("testHandler").apply { start() } in <lambda>() constant 41 handlerThread.waitForIdle(TIMEOUT_MS) in <lambda>() 58 handlerThread.threadHandler.post { tempRunnable.memory.append("a"); } in <lambda>() 59 handlerThread.threadHandler.post(tempRunnable) in <lambda>() 60 handlerThread.waitForIdle(TIMEOUT_MS) in <lambda>() 69 val handlerThread = HandlerThread("testHandler").apply { start() } in <lambda>() constant 70 val handler = Handler(handlerThread.looper) in <lambda>()
|
/aosp_15_r20/cts/tests/tests/media/audio/src/android/media/audio/cts/ |
H A D | AudioFocusTest.java | 280 final HandlerThread handlerThread = new HandlerThread(TAG); in testNullListenerHandlerNpe() local 281 handlerThread.start(); in testNullListenerHandlerNpe() 282 final Handler h = new Handler(handlerThread.getLooper()); in testNullListenerHandlerNpe() 422 final HandlerThread handlerThread = new HandlerThread(TAG); in testAudioFocusDelayedByCall() local 423 handlerThread.start(); in testAudioFocusDelayedByCall() 424 final Handler handler = new Handler(handlerThread.getLooper()); in testAudioFocusDelayedByCall() 475 handlerThread.quitSafely(); in testAudioFocusDelayedByCall() 494 final HandlerThread handlerThread = new HandlerThread(TAG); in testAudioFocusTransientDelayedByCall() local 495 handlerThread.start(); in testAudioFocusTransientDelayedByCall() 496 final Handler handler = new Handler(handlerThread.getLooper()); in testAudioFocusTransientDelayedByCall() [all …]
|
/aosp_15_r20/packages/services/Telecomm/src/com/android/server/telecom/metrics/ |
D | TelecomMetricsController.java | 49 @NonNull HandlerThread handlerThread) { in TelecomMetricsController() argument 51 mHandlerThread = handlerThread; in TelecomMetricsController() 57 HandlerThread handlerThread = new HandlerThread(TAG); in make() local 58 handlerThread.start(); in make() 59 return make(context, handlerThread); in make() 65 @NonNull HandlerThread handlerThread) { in make() argument 68 Objects.requireNonNull(handlerThread); in make() 69 return new TelecomMetricsController(context, handlerThread); in make()
|
/aosp_15_r20/packages/apps/Dialer/java/com/android/dialer/simulator/impl/ |
D | RttChatBot.java | 56 private final HandlerThread handlerThread; field in RttChatBot 59 handlerThread = new HandlerThread("RttChatBot"); in RttChatBot() 60 handlerThread.start(); in RttChatBot() 61 messageHandler = new MessageHandler(handlerThread.getLooper(), rttTextStream); in RttChatBot() 75 if (handlerThread != null && handlerThread.isAlive()) { in stop() 76 handlerThread.quit(); in stop()
|
/aosp_15_r20/frameworks/base/packages/SystemUI/src/com/android/systemui/util/concurrency/ |
H A D | ThreadFactoryImpl.java | 33 HandlerThread handlerThread = new HandlerThread(threadName); in buildLooperOnNewThread() local 34 handlerThread.start(); in buildLooperOnNewThread() 35 return handlerThread.getLooper(); in buildLooperOnNewThread() 50 HandlerThread handlerThread = new HandlerThread(threadName); in buildDelayableExecutorOnNewThread() local 51 handlerThread.start(); in buildDelayableExecutorOnNewThread() 52 return buildDelayableExecutorOnLooper(handlerThread.getLooper()); in buildDelayableExecutorOnNewThread()
|
/aosp_15_r20/cts/libs/install/src/com/android/cts/install/lib/ |
H A D | InstallUtils.java | 230 HandlerThread handlerThread = new HandlerThread("RollbackTestHandlerThread"); in processUserData() local 231 handlerThread.start(); in processUserData() 251 }, new Handler(handlerThread.getLooper()), 0, NO_RESPONSE, null); in processUserData() 278 HandlerThread handlerThread = new HandlerThread("RollbackTestHandlerThread"); in getUserDataVersion() local 279 handlerThread.start(); in getUserDataVersion() 293 }, new Handler(handlerThread.getLooper()), noResponse, null, null); in getUserDataVersion() 310 var handlerThread = new HandlerThread("TestHandlerThread"); in sendBroadcastAndWait() local 311 handlerThread.start(); in sendBroadcastAndWait() 320 }, new Handler(handlerThread.getLooper()), 0, null, null); in sendBroadcastAndWait()
|
/aosp_15_r20/packages/modules/NetworkStack/tests/unit/src/android/net/ip/ |
D | IpReachabilityMonitorTest.kt | 213 private val handlerThread = HandlerThread(IpReachabilityMonitorTest::class.simpleName) constant in android.net.ip.IpReachabilityMonitorTest 214 private val handler by lazy { Handler(handlerThread.looper) } in <lambda>() 282 handlerThread.start() in setUp() 328 handlerThread.waitForIdle(TEST_TIMEOUT_MS) in tearDown() 330 handlerThread.quitSafely() in tearDown() 380 handlerThread.waitForIdle(TEST_TIMEOUT_MS) in runLoseProvisioningTest() 423 handlerThread.waitForIdle(TEST_TIMEOUT_MS) in runLoseNeighborStillProvisionedTest() 436 handlerThread.waitForIdle(TEST_TIMEOUT_MS) in prepareNeighborReachableButMacAddrChangedTest() 618 handlerThread.waitForIdle(TEST_TIMEOUT_MS) in testLoseProvisioning_ignoreNeverReachableIpv6GatewayLost_withTwoIPv6DnsServers() 626 handlerThread.waitForIdle(TEST_TIMEOUT_MS) in testLoseProvisioning_ignoreNeverReachableIpv6GatewayLost_withTwoIPv6DnsServers() [all …]
|
/aosp_15_r20/packages/modules/Telephony/libs/TelephonyStatsLib/src/com/android/telephony/statslib/ |
D | StatsLib.java | 44 HandlerThread handlerThread = new HandlerThread("StatsLibStorage"); in StatsLib() local 45 handlerThread.start(); in StatsLib() 46 mHandler = new WritePushedAtomHandler(handlerThread.getLooper()); in StatsLib() 53 HandlerThread handlerThread = new HandlerThread("StatsLibStorage"); in StatsLib() local 54 handlerThread.start(); in StatsLib() 55 mHandler = new WritePushedAtomHandler(handlerThread.getLooper()); in StatsLib()
|
/aosp_15_r20/cts/tests/tests/nfc/src/android/nfc/cts/ |
H A D | NfcUtils.java | 56 HandlerThread handlerThread = new HandlerThread("nfc_cts_listener"); in enableNfc() local 57 handlerThread.start(); in enableNfc() 58 Handler handler = new Handler(handlerThread.getLooper()); in enableNfc() 99 HandlerThread handlerThread = new HandlerThread("nfc_cts_listener"); in disableNfc() local 100 handlerThread.start(); in disableNfc() 101 Handler handler = new Handler(handlerThread.getLooper()); in disableNfc()
|
/aosp_15_r20/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/core/src/main/java/com/google/android/exoplayer2/drm/ |
H A D | OfflineLicenseHelper.java | 44 private final HandlerThread handlerThread; field in OfflineLicenseHelper 153 handlerThread = new HandlerThread("ExoPlayer:OfflineLicenseHelper"); in OfflineLicenseHelper() 154 handlerThread.start(); in OfflineLicenseHelper() 179 eventDispatcher.addEventListener(new Handler(handlerThread.getLooper()), eventListener); in OfflineLicenseHelper() 236 drmSessionManager.setPlayer(handlerThread.getLooper(), PlayerId.UNSET); in getLicenseDurationRemainingSec() 259 handlerThread.quit(); in release() 265 drmSessionManager.setPlayer(handlerThread.getLooper(), PlayerId.UNSET); in blockingKeyRequest()
|
/aosp_15_r20/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/core/src/main/java/com/google/android/exoplayer2/drm/ |
H A D | OfflineLicenseHelper.java | 44 private final HandlerThread handlerThread; field in OfflineLicenseHelper 156 handlerThread = new HandlerThread("ExoPlayer:OfflineLicenseHelper"); in OfflineLicenseHelper() 157 handlerThread.start(); in OfflineLicenseHelper() 182 eventDispatcher.addEventListener(new Handler(handlerThread.getLooper()), eventListener); in OfflineLicenseHelper() 239 drmSessionManager.setPlayer(handlerThread.getLooper(), PlayerId.UNSET); in getLicenseDurationRemainingSec() 262 handlerThread.quit(); in release() 268 drmSessionManager.setPlayer(handlerThread.getLooper(), PlayerId.UNSET); in blockingKeyRequest()
|
/aosp_15_r20/packages/modules/Connectivity/tests/unit/java/com/android/server/net/ |
D | SkDestroyListenerTest.kt | 38 val handlerThread = HandlerThread("SkDestroyListenerTest") constant in com.android.server.net.SkDestroyListenerTest 43 handlerThread.start() in setUp() 48 handlerThread.quitSafely() in tearDown() 49 handlerThread.join() in tearDown() 56 val handler = Handler(handlerThread.looper) in testDump()
|
/aosp_15_r20/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | HandlerUtilsTest.kt | 37 val handlerThread = HandlerThread("HandlerUtilsTestHandlerThread").also { in <lambda>() constant in com.android.net.module.util.HandlerUtilsTest 40 val handler = handlerThread.threadHandler 48 assertEquals(Thread.currentThread(), handlerThread) in testRunWithScissors() 78 handlerThread.quitSafely() in tearDown() 79 handlerThread.join() in tearDown()
|
/aosp_15_r20/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
H A D | PhoneAccountTest.java | 106 final HandlerThread handlerThread = new HandlerThread("Observer"); in internalTestOutgoingCall() local 113 handlerThread.start(); in internalTestOutgoingCall() 115 new CalllogContentObserver(new Handler(handlerThread.getLooper()), in internalTestOutgoingCall() 130 handlerThread.quit(); in internalTestOutgoingCall() 187 final HandlerThread handlerThread = new HandlerThread("Observer"); in internalTestIncomingCall() local 194 handlerThread.start(); in internalTestIncomingCall() 196 new CalllogContentObserver(new Handler(handlerThread.getLooper()), in internalTestIncomingCall() 212 handlerThread.quit(); in internalTestIncomingCall()
|