/frameworks/base/services/core/java/com/android/server/am/ |
D | BroadcastLoopers.java | 77 waitForCondition(pw, (looper, latch) -> { in waitForIdle() 80 latch.countDown(); in waitForIdle() 92 waitForCondition(pw, (looper, latch) -> { in waitForBarrier() 94 latch.countDown(); in waitForBarrier() 104 final CountDownLatch latch; in waitForCondition() local 107 latch = new CountDownLatch(N); in waitForCondition() 112 latch.countDown(); in waitForCondition() 114 condition.accept(looper, latch); in waitForCondition() 120 while (latch.getCount() > 0) { in waitForCondition() 124 pw.println("Waiting for " + latch.getCount() + " loopers to drain..."); in waitForCondition()
|
/frameworks/base/tests/GamePerformance/src/android/gameperformance/ |
D | GamePerformanceActivity.java | 59 final CountDownLatch latch = new CountDownLatch(1); in attachSurfaceView() local 66 latch.countDown(); in attachSurfaceView() 69 latch.await(); in attachSurfaceView() 79 final CountDownLatch latch = new CountDownLatch(1); in attachOpenGLView() local 86 latch.countDown(); in attachOpenGLView() 89 latch.await(); in attachOpenGLView() 98 final CountDownLatch latch = new CountDownLatch(1); in attachControlView() local 105 latch.countDown(); in attachControlView() 108 latch.await(); in attachControlView()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/ |
D | ShellExecutor.java | 47 final CountDownLatch latch = new CountDownLatch(1); in executeBlocking() local 50 latch.countDown(); in executeBlocking() 52 latch.await(waitTimeout, waitTimeUnit); in executeBlocking() 71 final CountDownLatch latch = new CountDownLatch(1); in executeBlockingForResult() local 74 latch.countDown(); in executeBlockingForResult() 77 latch.await(); in executeBlockingForResult()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/ |
D | AccountManagerServiceTest.java | 606 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionSuccessWithoutPasswordForwarding() local 607 Response response = new Response(latch, mMockAccountManagerResponse); in testStartAddAccountSessionSuccessWithoutPasswordForwarding() 617 waitForLatch(latch); in testStartAddAccountSessionSuccessWithoutPasswordForwarding() 637 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionSuccessWithPasswordForwarding() local 638 Response response = new Response(latch, mMockAccountManagerResponse); in testStartAddAccountSessionSuccessWithPasswordForwarding() 649 waitForLatch(latch); in testStartAddAccountSessionSuccessWithPasswordForwarding() 677 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionReturnWithInvalidIntent() local 678 Response response = new Response(latch, mMockAccountManagerResponse); in testStartAddAccountSessionReturnWithInvalidIntent() 689 waitForLatch(latch); in testStartAddAccountSessionReturnWithInvalidIntent() 706 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionReturnWithValidIntent() local [all …]
|
/frameworks/base/core/tests/coretests/src/android/window/ |
D | BackNavigationTest.java | 68 CountDownLatch latch = registerBackCallback(); in registerCallback_initialized() local 70 assertCallbackIsCalled(latch); in registerCallback_initialized() 76 CountDownLatch latch = registerBackCallback(); in registerCallback_created() local 79 assertCallbackIsCalled(latch); in registerCallback_created() 87 CountDownLatch latch = registerBackCallback(); in registerCallback_resumed() local 88 assertCallbackIsCalled(latch); in registerCallback_resumed() 91 private void assertCallbackIsCalled(CountDownLatch latch) { in assertCallbackIsCalled() argument 99 assertTrue(latch.await(500, TimeUnit.MILLISECONDS)); in assertCallbackIsCalled()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/infra/ |
D | AndroidFutureTest.java | 54 CountDownLatch latch = new CountDownLatch(1); in testWhenComplete_AlreadyComplete() local 58 latch.countDown(); in testWhenComplete_AlreadyComplete() 60 latch.await(); in testWhenComplete_AlreadyComplete() 66 CountDownLatch latch = new CountDownLatch(1); in testWhenComplete_NotYetComplete() local 70 latch.countDown(); in testWhenComplete_NotYetComplete() 72 assertThat(latch.getCount()).isEqualTo(1); in testWhenComplete_NotYetComplete() 74 latch.await(); in testWhenComplete_NotYetComplete() 75 assertThat(latch.getCount()).isEqualTo(0); in testWhenComplete_NotYetComplete() 93 CountDownLatch latch = new CountDownLatch(1); in testCompleteExceptionally_Listener() local 97 latch.countDown(); in testCompleteExceptionally_Listener() [all …]
|
/frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ |
D | ContentCaptureManagerServiceShellCommand.java | 185 final CountDownLatch latch = new CountDownLatch(1); in requestDestroy() local 189 latch.countDown(); in requestDestroy() 192 return requestSessionCommon(pw, latch, () -> mService.destroySessions(userId, receiver)); in requestDestroy() 201 final CountDownLatch latch = new CountDownLatch(1); in requestList() local 210 latch.countDown(); in requestList() 213 return requestSessionCommon(pw, latch, () -> mService.listSessions(userId, receiver)); in requestList() 225 private int requestSessionCommon(PrintWriter pw, CountDownLatch latch, in requestSessionCommon() argument 228 return waitForLatch(pw, latch); in requestSessionCommon() 231 private int waitForLatch(PrintWriter pw, CountDownLatch latch) { in waitForLatch() argument 233 final boolean received = latch.await(5, TimeUnit.SECONDS); in waitForLatch()
|
/frameworks/libs/systemui/weathereffects/graphics/tests/src/com/google/android/wallpaper/weathereffects/graphics/ |
D | FrameBufferTest.kt | 45 val latch = CountDownLatch(1) in onImageReady_invokesCallback() constant 51 latch.countDown() in onImageReady_invokesCallback() 56 assertThat(latch.await(RESULT_FENCE_TIME_OUT, TimeUnit.MILLISECONDS)).isTrue() in onImageReady_invokesCallback() 78 val latch = CountDownLatch(1) in close_onImageReady_doesNotInvokeCallback() constant 84 latch.countDown() in close_onImageReady_doesNotInvokeCallback() 89 assertThat(latch.await(RESULT_FENCE_TIME_OUT, TimeUnit.MILLISECONDS)).isFalse() in close_onImageReady_doesNotInvokeCallback()
|
/frameworks/base/core/tests/coretests/src/android/transition/ |
D | FadeTransitionTest.java | 53 TransitionLatch latch = setVisibilityInTransition(fadeOut, R.id.square1, View.INVISIBLE); in testFadeOutAndIn() local 54 assertTrue(latch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeOutAndIn() 58 assertTrue(latch.endLatch.await(800, TimeUnit.MILLISECONDS)); in testFadeOutAndIn() 63 latch = setVisibilityInTransition(fadeIn, R.id.square1, View.VISIBLE); in testFadeOutAndIn() 64 assertTrue(latch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeOutAndIn() 70 assertTrue(latch.endLatch.await(800, TimeUnit.MILLISECONDS)); in testFadeOutAndIn() 176 TransitionLatch latch = new TransitionLatch(); in setVisibilityInTransition() local 177 transition.addListener(latch); in setVisibilityInTransition() 185 return latch; in setVisibilityInTransition() 192 final CountDownLatch latch = new CountDownLatch(2); in waitForAnimation() local [all …]
|
D | SlideTransitionTest.java | 58 TransitionLatch latch = setVisibilityInTransition(slideOut, R.id.square1, View.INVISIBLE); in testShortSlide() local 59 assertTrue(latch.startLatch.await(200, TimeUnit.MILLISECONDS)); in testShortSlide() 65 assertTrue(latch.endLatch.await(400, TimeUnit.MILLISECONDS)); in testShortSlide() 75 latch = setVisibilityInTransition(slideIn, R.id.square1, View.VISIBLE); in testShortSlide() 76 assertTrue(latch.startLatch.await(200, TimeUnit.MILLISECONDS)); in testShortSlide() 82 assertTrue(latch.endLatch.await(400, TimeUnit.MILLISECONDS)); in testShortSlide() 94 TransitionLatch latch = new TransitionLatch(); in setVisibilityInTransition() local 95 transition.addListener(latch); in setVisibilityInTransition() 103 return latch; in setVisibilityInTransition()
|
/frameworks/base/services/autofill/java/com/android/server/autofill/ |
D | AutofillManagerServiceShellCommand.java | 306 final CountDownLatch latch = new CountDownLatch(1); in getFieldClassificationScore() local 314 latch.countDown(); in getFieldClassificationScore() 317 return waitForLatch(pw, latch); in getFieldClassificationScore() 433 CountDownLatch latch = new CountDownLatch(1); in getSavedPasswordCount() local 441 latch.countDown(); in getSavedPasswordCount() 445 waitForLatch(pw, latch); in getSavedPasswordCount() 456 final CountDownLatch latch = new CountDownLatch(1); in requestDestroy() local 460 latch.countDown(); in requestDestroy() 463 return requestSessionCommon(pw, latch, () -> mService.removeAllSessions(userId, receiver)); in requestDestroy() 472 final CountDownLatch latch = new CountDownLatch(1); in requestList() local [all …]
|
/frameworks/base/services/tests/voiceinteractiontests/src/com/android/server/soundtrigger/ |
D | DeviceStateHandlerTest.java | 89 CountDownLatch latch; in waitAndAssertState() local 91 latch = mLatch; in waitAndAssertState() 93 latch.await(); in waitAndAssertState() 101 CountDownLatch latch; in waitToConfirmNoEventReceived() local 103 latch = mLatch; in waitToConfirmNoEventReceived() 106 assertThat(latch.await(CONFIRM_NO_EVENT_WAIT_MS, TimeUnit.MILLISECONDS)).isFalse(); in waitToConfirmNoEventReceived() 252 CountDownLatch latch; in whenPhoneCallReceived_receiveStateChangeFast() local 254 latch = mLatch; in whenPhoneCallReceived_receiveStateChangeFast() 256 assertThat(latch.await(PHONE_DELAY_BRIEF_WAIT_MS, TimeUnit.MILLISECONDS)).isTrue(); in whenPhoneCallReceived_receiveStateChangeFast()
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | RemoteCallbackTest.java | 42 final CountDownLatch latch = new CountDownLatch(1); in testSimple() local 44 latch.countDown(); in testSimple() 47 assertEquals(1, latch.getCount()); in testSimple() 49 assertTrue(latch.await(100, TimeUnit.MILLISECONDS)); in testSimple()
|
D | ResultReceiverTest.java | 42 final CountDownLatch latch = new CountDownLatch(1); in testSimple() local 46 latch.countDown(); in testSimple() 50 assertEquals(1, latch.getCount()); in testSimple() 52 assertTrue(latch.await(100, TimeUnit.MILLISECONDS)); in testSimple()
|
D | TestLooperManagerTest.java | 63 final CountDownLatch latch = new CountDownLatch(1); in doTest() local 69 latch.countDown(); in doTest() 72 assertFalse(latch.await(100, TimeUnit.MILLISECONDS)); in doTest() 79 assertFalse(latch.await(100, TimeUnit.MILLISECONDS)); in doTest() 86 assertTrue(latch.await(100, TimeUnit.MILLISECONDS)); in doTest()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | RecoverySnapshotListenersStorageTest.java | 62 CountDownLatch latch = new CountDownLatch(1); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified() local 67 latch.countDown(); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified() 73 assertTrue(latch.await(TEST_TIMEOUT_SECONDS, TimeUnit.SECONDS)); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified() 85 CountDownLatch latch = new CountDownLatch(2); in setSnapshotListener_doesNotRepeatedlyInvokeListener() local 89 latch.countDown(); in setSnapshotListener_doesNotRepeatedlyInvokeListener() 98 assertFalse(latch.await(TEST_TIMEOUT_SECONDS, TimeUnit.SECONDS)); in setSnapshotListener_doesNotRepeatedlyInvokeListener()
|
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/ |
D | TextToSpeechTests.java | 191 final CountDownLatch latch = new CountDownLatch(1); in blockingCallSpeak() local 192 doCountDown(latch).when(mock).onSynthesizeText(Mockito.<SynthesisRequest>anyObject(), in blockingCallSpeak() 196 awaitCountDown(latch, 5, TimeUnit.SECONDS); in blockingCallSpeak() 204 final CountDownLatch latch = new CountDownLatch(1); in blockingInitAndVerify() local 205 doCountDown(latch).when(listener).onInit(errorCode); in blockingInitAndVerify() 210 awaitCountDown(latch, 5, TimeUnit.SECONDS); in blockingInitAndVerify() 222 public static CountDownBehaviour doCountDown(final CountDownLatch latch) { in doCountDown() argument 229 latch.countDown(); in doCountDown() 243 latch.countDown(); in doCountDown() 253 public static void awaitCountDown(CountDownLatch latch, long timeout, TimeUnit unit) [all …]
|
/frameworks/base/core/tests/coretests/src/android/animation/ |
D | AnimatorSetCallsTest.java | 362 CountDownLatch latch = new CountDownLatch(3); in reentrantStart() local 367 latch.countDown(); in reentrantStart() 374 assertTrue(latch.await(1, TimeUnit.SECONDS)); in reentrantStart() 382 CountDownLatch latch = new CountDownLatch(3); in reentrantEnd() local 387 latch.countDown(); in reentrantEnd() 397 assertTrue(latch.await(1, TimeUnit.SECONDS)); in reentrantEnd() 405 CountDownLatch latch = new CountDownLatch(3); in reentrantPause() local 410 latch.countDown(); in reentrantPause() 420 assertTrue(latch.await(1, TimeUnit.SECONDS)); in reentrantPause() 428 CountDownLatch latch = new CountDownLatch(3); in reentrantResume() local [all …]
|
/frameworks/base/services/core/java/com/android/server/location/settings/ |
D | SettingsStore.java | 133 CountDownLatch latch = new CountDownLatch(1); 134 BackgroundThread.getExecutor().execute(latch::countDown); 135 latch.await(); 140 CountDownLatch latch = new CountDownLatch(1); 143 latch.countDown(); 145 latch.await();
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | TaskStackChangedListenerTest.java | 140 final CountDownLatch latch = new CountDownLatch(1); in testTaskStackChanged_afterFinish() local 144 latch.countDown(); in testTaskStackChanged_afterFinish() 149 waitForCallback(latch); in testTaskStackChanged_afterFinish() 155 final CountDownLatch latch = new CountDownLatch(1); in testTaskStackChanged_resumeWhilePausing() local 159 latch.countDown(); in testTaskStackChanged_resumeWhilePausing() 164 waitForCallback(latch); in testTaskStackChanged_resumeWhilePausing() 171 final CountDownLatch latch = new CountDownLatch(2); in testTaskDescriptionChanged() local 185 latch.countDown(); in testTaskDescriptionChanged() 194 waitForCallback(latch); in testTaskDescriptionChanged() 203 final CountDownLatch latch = new CountDownLatch(1); in testActivityRequestedOrientationChanged() local [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/ |
D | ControlsFavoritingActivityTest.kt | 62 val latch = CountDownLatch(1) in waitForPost() constant 63 post(latch::countDown) in waitForPost() 64 latch.await() in waitForPost() 75 private var latch: CountDownLatch = CountDownLatch(1) variable in com.android.systemui.controls.management.ControlsFavoritingActivityTest 92 latch in <lambda>() 116 latch.await() // ensure activity is finished in testBackCallbackRegistrationAndUnregistration() 186 private val latch: CountDownLatch constant 206 latch.countDown() in onStop()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/ |
D | IccFileHandlerTest.java | 216 final CountDownLatch latch = new CountDownLatch(1); in loadEFLinearFixedAll_FileNotFoundAtGetRecord() local 223 mTestHandler.postDelayed(latch::countDown, 100); in loadEFLinearFixedAll_FileNotFoundAtGetRecord() 232 latch.await(5, java.util.concurrent.TimeUnit.SECONDS); in loadEFLinearFixedAll_FileNotFoundAtGetRecord() 241 final CountDownLatch latch = new CountDownLatch(2); in loadEFLinearFixedAll_FileNotFoundAtReadRecord() local 249 latch.countDown(); in loadEFLinearFixedAll_FileNotFoundAtReadRecord() 252 mTestHandler.postDelayed(latch::countDown, 100); in loadEFLinearFixedAll_FileNotFoundAtReadRecord() 263 latch.await(5, java.util.concurrent.TimeUnit.SECONDS); in loadEFLinearFixedAll_FileNotFoundAtReadRecord() 272 final CountDownLatch latch = new CountDownLatch(1); in loadEFLinearFixedAll_ExceptionAtGetRecord() local 279 mTestHandler.postDelayed(latch::countDown, 100); in loadEFLinearFixedAll_ExceptionAtGetRecord() 287 latch.await(5, java.util.concurrent.TimeUnit.SECONDS); in loadEFLinearFixedAll_ExceptionAtGetRecord() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | AbstractCrossUserContentResolverTest.java | 89 final CountDownLatch latch = new CountDownLatch(1); in unlockUser() local 95 latch.countDown(); in unlockUser() 105 if (!latch.await(TIMEOUT_USER_UNLOCK_SEC, TimeUnit.SECONDS)) { in unlockUser() 175 public CrossUserContentServiceConnection(CountDownLatch latch) { in CrossUserContentServiceConnection() argument 176 mLatch = latch; in CrossUserContentServiceConnection() 199 public TestContentObserver(CountDownLatch latch, Uri exptectedUri, int expectedUserId) { in TestContentObserver() argument 201 mLatch = latch; in TestContentObserver()
|
/frameworks/base/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/animation/ |
D | PhysicsAnimatorTestUtils.kt | 77 val latch = CountDownLatch(1) in <lambda>() constant 80 latch.countDown() in <lambda>() 83 latch.await() in <lambda>() 126 val latch = CountDownLatch(animatingProperties.size) in <lambda>() constant 139 latch.countDown() in <lambda>() 144 latch.await(timeoutMs, TimeUnit.MILLISECONDS) in <lambda>() 182 val latch = CountDownLatch(1) in <lambda>() constant 190 latch.countDown() in <lambda>() 195 latch.await(timeoutMs, TimeUnit.MILLISECONDS) in <lambda>()
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | SpannableTest.java | 70 final CountDownLatch latch = new CountDownLatch(1); in testRemoveSpanWithIntermediateFlag() local 77 latch.countDown(); in testRemoveSpanWithIntermediateFlag() 87 assertEquals(1, latch.getCount()); in testRemoveSpanWithIntermediateFlag() 89 assertEquals(0, latch.getCount()); in testRemoveSpanWithIntermediateFlag()
|