Home
last modified time | relevance | path

Searched refs:latch (Results 1 – 25 of 73) sorted by relevance

123

/frameworks/base/apct-tests/perftests/multiuser/src/android/multiuser/
DUserLifecycleTests.java106 final CountDownLatch latch = new CountDownLatch(1); in createAndStartUser() local
107 registerBroadcastReceiver(Intent.ACTION_USER_STARTED, latch, userInfo.id); in createAndStartUser()
109 latch.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS); in createAndStartUser()
141 final CountDownLatch latch = new CountDownLatch(1); in switchUser_stopped() local
142 registerBroadcastReceiver(Intent.ACTION_USER_UNLOCKED, latch, testUser); in switchUser_stopped()
146 boolean success = latch.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS); in switchUser_stopped()
180 final CountDownLatch latch = new CountDownLatch(1); in stopUser() local
181 registerBroadcastReceiver(Intent.ACTION_USER_STARTED, latch, userInfo.id); in stopUser()
183 latch.await(TIMEOUT_IN_SECOND, TimeUnit.SECONDS); in stopUser()
200 final CountDownLatch latch = new CountDownLatch(1); in lockedBootCompleted() local
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/accounts/
DAccountManagerServiceTest.java548 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionSuccessWithoutPasswordForwarding() local
549 Response response = new Response(latch, mMockAccountManagerResponse); in testStartAddAccountSessionSuccessWithoutPasswordForwarding()
559 waitForLatch(latch); in testStartAddAccountSessionSuccessWithoutPasswordForwarding()
579 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionSuccessWithPasswordForwarding() local
580 Response response = new Response(latch, mMockAccountManagerResponse); in testStartAddAccountSessionSuccessWithPasswordForwarding()
591 waitForLatch(latch); in testStartAddAccountSessionSuccessWithPasswordForwarding()
619 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionReturnWithInvalidIntent() local
620 Response response = new Response(latch, mMockAccountManagerResponse); in testStartAddAccountSessionReturnWithInvalidIntent()
631 waitForLatch(latch); in testStartAddAccountSessionReturnWithInvalidIntent()
648 final CountDownLatch latch = new CountDownLatch(1); in testStartAddAccountSessionReturnWithValidIntent() local
[all …]
/frameworks/base/services/contentcapture/java/com/android/server/contentcapture/
DContentCaptureManagerServiceShellCommand.java185 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/base/core/tests/coretests/src/android/transition/
DFadeTransitionTest.java53 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 …]
DSlideTransitionTest.java58 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/tests/GamePerformance/src/android/gameperformance/
DGamePerformanceActivity.java41 final CountDownLatch latch = new CountDownLatch(1); in attachSurfaceView() local
51 latch.countDown(); in attachSurfaceView()
54 latch.await(); in attachSurfaceView()
64 final CountDownLatch latch = new CountDownLatch(1); in attachOpenGLView() local
74 latch.countDown(); in attachOpenGLView()
77 latch.await(); in attachOpenGLView()
DGamePerformanceTest.java58 CountDownLatch latch = new CountDownLatch(1); in testGraphicBufferMetrics() local
67 latch.countDown(); in testGraphicBufferMetrics()
73 latch.await(); in testGraphicBufferMetrics()
/frameworks/base/services/autofill/java/com/android/server/autofill/
DAutofillManagerServiceShellCommand.java246 final CountDownLatch latch = new CountDownLatch(1); in getFieldClassificationScore() local
254 latch.countDown(); in getFieldClassificationScore()
257 return waitForLatch(pw, latch); in getFieldClassificationScore()
351 final CountDownLatch latch = new CountDownLatch(1); in requestDestroy() local
355 latch.countDown(); in requestDestroy()
358 return requestSessionCommon(pw, latch, () -> mService.destroySessions(userId, receiver)); in requestDestroy()
367 final CountDownLatch latch = new CountDownLatch(1); in requestList() local
376 latch.countDown(); in requestList()
379 return requestSessionCommon(pw, latch, () -> mService.listSessions(userId, receiver)); in requestList()
391 private int requestSessionCommon(PrintWriter pw, CountDownLatch latch, in requestSessionCommon() argument
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DRecoverySnapshotListenersStorageTest.java58 CountDownLatch latch = new CountDownLatch(1); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified() local
63 latch.countDown(); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified()
69 assertTrue(latch.await(TEST_TIMEOUT_SECONDS, TimeUnit.SECONDS)); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified()
79 CountDownLatch latch = new CountDownLatch(2); in setSnapshotListener_doesNotRepeatedlyInvokeListener() local
83 latch.countDown(); in setSnapshotListener_doesNotRepeatedlyInvokeListener()
91 assertFalse(latch.await(TEST_TIMEOUT_SECONDS, TimeUnit.SECONDS)); in setSnapshotListener_doesNotRepeatedlyInvokeListener()
/frameworks/base/tests/TtsTests/src/com/android/speech/tts/
DTextToSpeechTests.java191 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/content/
DAbstractCrossUserContentResolverTest.java82 final CountDownLatch latch = new CountDownLatch(1); in unlockUser() local
88 latch.countDown(); in unlockUser()
97 if (!latch.await(TIMEOUT_USER_UNLOCK_SEC, TimeUnit.SECONDS)) { in unlockUser()
165 public CrossUserContentServiceConnection(CountDownLatch latch) { in CrossUserContentServiceConnection() argument
166 mLatch = latch; in CrossUserContentServiceConnection()
189 public TestContentObserver(CountDownLatch latch, Uri exptectedUri, int expectedUserId) { in TestContentObserver() argument
191 mLatch = latch; in TestContentObserver()
/frameworks/base/core/tests/coretests/src/android/text/
DSpannableTest.java70 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()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ims/
DMmTelFeatureCompatAdapter.java89 public ConfigListener(int capability, int tech, CountDownLatch latch) { in ConfigListener() argument
92 mLatch = latch; in ConfigListener()
294 CountDownLatch latch = new CountDownLatch(1); in queryCapabilityConfiguration() local
301 new ConfigListener(capConverted, regTech, latch) { in queryCapabilityConfiguration()
311 latch.await(WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); in queryCapabilityConfiguration()
328 CountDownLatch latch = new CountDownLatch(1); in changeEnabledCapabilities() local
335 new ConfigListener(capConverted, radioTechConverted, latch) { in changeEnabledCapabilities()
349 latch.await(WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); in changeEnabledCapabilities()
353 CountDownLatch latch = new CountDownLatch(1); in changeEnabledCapabilities() local
360 new ConfigListener(capConverted, radioTechConverted, latch) { in changeEnabledCapabilities()
[all …]
/frameworks/base/core/java/android/permission/
DPermissionControllerService.java267 CountDownLatch latch = new CountDownLatch(1); in onBind() local
268 onGetRuntimePermissionsBackup(user, backup, latch::countDown); in onBind()
269 latch.await(); in onBind()
285 CountDownLatch latch = new CountDownLatch(1); in onBind() local
286 onRestoreRuntimePermissionsBackup(user, backup, latch::countDown); in onBind()
287 latch.await(); in onBind()
340 CountDownLatch latch = new CountDownLatch(1); in onBind() local
342 permissionName, latch::countDown); in onBind()
344 latch.await(); in onBind()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskStackChangedListenerTest.java113 final CountDownLatch latch = new CountDownLatch(1); in testTaskDescriptionChanged() local
128 latch.countDown(); in testTaskDescriptionChanged()
137 waitForCallback(latch); in testTaskDescriptionChanged()
146 final CountDownLatch latch = new CountDownLatch(1); in testActivityRequestedOrientationChanged() local
153 latch.countDown(); in testActivityRequestedOrientationChanged()
160 waitForCallback(latch); in testActivityRequestedOrientationChanged()
344 private void waitForCallback(CountDownLatch latch) { in waitForCallback() argument
346 final boolean result = latch.await(4, TimeUnit.SECONDS); in waitForCallback()
DDragDropControllerTests.java138 final CountDownLatch latch; in tearDown() local
146 latch = new CountDownLatch(1); in tearDown()
147 mTarget.setOnClosedCallbackLocked(latch::countDown); in tearDown()
149 assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in tearDown()
DHighRefreshRateBlacklistTest.java150 CountDownLatch latch = new CountDownLatch(mListeners.size()); in setBlacklist() local
158 latch.countDown(); in setBlacklist()
162 latch.await(10, TimeUnit.SECONDS); in setBlacklist()
/frameworks/base/services/backup/java/com/android/server/backup/params/
DAdbParams.java30 public final AtomicBoolean latch; field in AdbParams
36 latch = new AtomicBoolean(false); in AdbParams()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/
DAppOpsInfoTest.java116 final CountDownLatch latch = new CountDownLatch(1); in testBindNotification_SetsOnClickListenerForSettings() local
122 latch.countDown(); in testBindNotification_SetsOnClickListenerForSettings()
128 assertEquals(0, latch.getCount()); in testBindNotification_SetsOnClickListenerForSettings()
135 final CountDownLatch latch = new CountDownLatch(1); in testOk() local
141 latch.countDown(); in testOk()
146 assertEquals(1, latch.getCount()); in testOk()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/euicc/
DEuiccController.java764 final CountDownLatch latch = new CountDownLatch(1); in blockingGetEuiccProfileInfoList() local
772 latch.countDown(); in blockingGetEuiccProfileInfoList()
777 latch.countDown(); in blockingGetEuiccProfileInfoList()
781 latch.await(); in blockingGetEuiccProfileInfoList()
1358 CountDownLatch latch = new CountDownLatch(1); in blockingGetEidFromEuiccService() local
1364 latch.countDown(); in blockingGetEidFromEuiccService()
1369 latch.countDown(); in blockingGetEidFromEuiccService()
1372 return awaitResult(latch, eidRef); in blockingGetEidFromEuiccService()
1376 CountDownLatch latch = new CountDownLatch(1); in blockingGetOtaStatusFromEuiccService() local
1383 latch.countDown(); in blockingGetOtaStatusFromEuiccService()
[all …]
/frameworks/base/packages/SystemUI/docs/
Dphysics-animation-testing.md11latch.await()``` does not affect the animations’ progress. The latch is initialized with a count e…
/frameworks/base/core/tests/coretests/src/android/view/
DViewGroupTransientViewTest.java122 final CountDownLatch latch = new CountDownLatch(1); in drawTransientView() local
123 mTestView.mOnDraw = () -> latch.countDown(); in drawTransientView()
130 if (!latch.await(3, TimeUnit.SECONDS)) { in drawTransientView()
/frameworks/base/core/tests/coretests/BstatsTestApp/src/com/android/coretests/apps/bstatstestapp/
DTestService.java132 final CountDownLatch latch = new CountDownLatch(1);
136 latch.countDown();
139 if (!latch.await(TIMEOUT_OVERLAY_SEC, TimeUnit.SECONDS)) {
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBstatsCpuTimesValidationTest.java725 final CountDownLatch latch = new CountDownLatch(1); in startIsolatedService() local
731 latch.countDown(); in startIsolatedService()
742 if (latch.await(START_ISOLATED_SERVICE_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in startIsolatedService()
754 final CountDownLatch latch = new CountDownLatch(1); in startForegroundService() local
764 latch.countDown(); in startForegroundService()
769 if (latch.await(START_FG_SERVICE_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in startForegroundService()
781 final CountDownLatch latch = new CountDownLatch(1); in startService() local
790 latch.countDown(); in startService()
795 if (latch.await(START_SERVICE_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in startService()
807 final CountDownLatch latch = new CountDownLatch(1); in startActivity() local
[all …]
/frameworks/opt/net/ims/src/java/com/android/ims/
DRcsFeatureManager.java337 CountDownLatch latch = new CountDownLatch(1); in isCapable() local
349 latch.countDown(); in isCapable()
367 return awaitResult(latch, capableRef); in isCapable()
375 private static <T> T awaitResult(CountDownLatch latch, AtomicReference<T> resultRef) { in awaitResult() argument
377 latch.await(); in awaitResult()

123