Home
last modified time | relevance | path

Searched refs:countDownLatch (Results 1 – 25 of 51) sorted by relevance

123

/packages/modules/AdServices/adservices/tests/cts/endtoends/measurement/src/com/android/adservices/tests/cts/measurement/
DMeasurementManagerCtsTest.java127 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_withNoServerSetupWithCallbackOsReceiver_noErrors() local
132 (OutcomeReceiver<Object, Exception>) result -> countDownLatch.countDown()); in testRegisterSource_withNoServerSetupWithCallbackOsReceiver_noErrors()
133 assertThat(countDownLatch.await(CALLBACK_TIMEOUT, TimeUnit.MILLISECONDS)).isTrue(); in testRegisterSource_withNoServerSetupWithCallbackOsReceiver_noErrors()
139 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_withNoServerSetupWithCallbackCustomReceiver_noErrors() local
145 result -> countDownLatch.countDown()); in testRegisterSource_withNoServerSetupWithCallbackCustomReceiver_noErrors()
146 assertThat(countDownLatch.await(CALLBACK_TIMEOUT, TimeUnit.MILLISECONDS)).isTrue(); in testRegisterSource_withNoServerSetupWithCallbackCustomReceiver_noErrors()
154 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_withLocalhostUriNonDebuggableCallerWithOsReceiver_fails() local
164 countDownLatch.countDown(); in testRegisterSource_withLocalhostUriNonDebuggableCallerWithOsReceiver_fails()
171 assertThat(countDownLatch.await(CALLBACK_TIMEOUT, TimeUnit.MILLISECONDS)).isTrue(); in testRegisterSource_withLocalhostUriNonDebuggableCallerWithOsReceiver_fails()
179 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_withLocalhostUriNonDebuggableCallerWithCustomReceiver_fails() local
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/
DWifiP2pShellCommand.java61 CountDownLatch countDownLatch = new CountDownLatch(1); in handleCommand() local
65 countDownLatch.countDown(); in handleCommand()
70 countDownLatch.countDown(); in handleCommand()
90 countDownLatch.await(1000, TimeUnit.MILLISECONDS); in handleCommand()
98 countDownLatch.await(1000, TimeUnit.MILLISECONDS); in handleCommand()
121 countDownLatch.await(1000, TimeUnit.MILLISECONDS); in handleCommand()
125 countDownLatch.await(1000, TimeUnit.MILLISECONDS); in handleCommand()
129 countDownLatch.await(1000, TimeUnit.MILLISECONDS); in handleCommand()
133 countDownLatch.await(1000, TimeUnit.MILLISECONDS); in handleCommand()
148 countDownLatch.countDown(); in handleCommand()
[all …]
/packages/modules/Uwb/tests/cts/tests/src/android/uwb/cts/
DUwbManagerTest.java164 CountDownLatch countDownLatch = new CountDownLatch(1); in setUwbEnabledAndWaitForCompletion() local
167 new AdapterStateCallback(countDownLatch, adapterState); in setUwbEnabledAndWaitForCompletion()
172 assertThat(countDownLatch.await(2, TimeUnit.SECONDS)).isTrue(); in setUwbEnabledAndWaitForCompletion()
433 AdfProvisionStateCallback(@NonNull CountDownLatch countDownLatch) { in AdfProvisionStateCallback() argument
434 mCountDownLatch = countDownLatch; in AdfProvisionStateCallback()
453 CountDownLatch countDownLatch = new CountDownLatch(1); in testProvisionProfileAdfByScriptWithoutUwbPrivileged() local
455 new AdfProvisionStateCallback(countDownLatch); in testProvisionProfileAdfByScriptWithoutUwbPrivileged()
625 public void replaceCtrlCountDownLatch(@NonNull CountDownLatch countDownLatch) { in replaceCtrlCountDownLatch() argument
626 mCtrlCountDownLatch = countDownLatch; in replaceCtrlCountDownLatch()
629 public void replaceResultCountDownLatch(@NonNull CountDownLatch countDownLatch) { in replaceResultCountDownLatch() argument
[all …]
/packages/modules/AdServices/adservices/tests/endtoends/src/com/android/adservices/measurement/
DMeasurementCompatibleManagerTest.java129 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_callingApp_expectedAttributionSource() local
132 countDownLatch.countDown(); in testRegisterSource_callingApp_expectedAttributionSource()
143 assertTrue(countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)); in testRegisterSource_callingApp_expectedAttributionSource()
172 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_adIdEnabled_register() local
175 countDownLatch.countDown(); in testRegisterSource_adIdEnabled_register()
195 assertTrue(countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)); in testRegisterSource_adIdEnabled_register()
211 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_adIdZeroOut_register() local
214 countDownLatch.countDown(); in testRegisterSource_adIdZeroOut_register()
234 assertTrue(countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)); in testRegisterSource_adIdZeroOut_register()
249 CountDownLatch countDownLatch = new CountDownLatch(1); in testRegisterSource_adIdDisabled_register() local
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/kanon/
DKAnonE2ETest.java483 CountDownLatch countDownLatch = new CountDownLatch(1); in persistAdSelectionData_withKAnonImmediateValueZero_savesTheMessageInDB() local
487 setupTestForPersistAdSelectionResult(countDownLatch); in persistAdSelectionData_withKAnonImmediateValueZero_savesTheMessageInDB()
492 countDownLatch.await(); in persistAdSelectionData_withKAnonImmediateValueZero_savesTheMessageInDB()
508 CountDownLatch countDownLatch = new CountDownLatch(1); in persistAdSelectionData_withKAnonFeatureFlagDisabled_doesNothing() local
512 setupTestForPersistAdSelectionResult(countDownLatch); in persistAdSelectionData_withKAnonFeatureFlagDisabled_doesNothing()
517 countDownLatch.await(); in persistAdSelectionData_withKAnonFeatureFlagDisabled_doesNothing()
597 CountDownLatch countDownLatch = new CountDownLatch(1); in persistAdSelectionData_withImmediateJoinValueHundred_signsAndJoinsMessage() local
599 setupTestForPersistAdSelectionResult(countDownLatch); in persistAdSelectionData_withImmediateJoinValueHundred_signsAndJoinsMessage()
606 countDownLatch.await(); in persistAdSelectionData_withImmediateJoinValueHundred_signsAndJoinsMessage()
657 CountDownLatch countDownLatch = new CountDownLatch(1); in persistAdSelectionData_actGenerateParamsFails_shouldNotUpdateStatusInDB() local
[all …]
DKAnonCallerImplTest.java292 CountDownLatch countDownLatch = new CountDownLatch(1); in test_signSuccessfulButJoinUnsuccessful_shouldUpdateKAnonMessageStatusToSignedDB() local
293 setupMockWithCountDownLatch(countDownLatch); in test_signSuccessfulButJoinUnsuccessful_shouldUpdateKAnonMessageStatusToSignedDB()
312 countDownLatch.await(); in test_signSuccessfulButJoinUnsuccessful_shouldUpdateKAnonMessageStatusToSignedDB()
324 CountDownLatch countDownLatch = new CountDownLatch(1); in test_signUnsuccessfulVerifyTokenFails_shouldUpdateKAnonMessageStatusToFailedInDB() local
325 setupMockWithCountDownLatch(countDownLatch); in test_signUnsuccessfulVerifyTokenFails_shouldUpdateKAnonMessageStatusToFailedInDB()
336 countDownLatch.await(); in test_signUnsuccessfulVerifyTokenFails_shouldUpdateKAnonMessageStatusToFailedInDB()
348 CountDownLatch countDownLatch = new CountDownLatch(1); in signUnsuccessfulCannotRecoverTokens_shouldUpdateKAnonMessageStatusToFailedInDB() local
349 setupMockWithCountDownLatch(countDownLatch); in signUnsuccessfulCannotRecoverTokens_shouldUpdateKAnonMessageStatusToFailedInDB()
360 countDownLatch.await(); in signUnsuccessfulCannotRecoverTokens_shouldUpdateKAnonMessageStatusToFailedInDB()
372 CountDownLatch countDownLatch = new CountDownLatch(1); in actGenerateClientParamsFails_shouldNotUpdateKAnonMessageStatusInDB() local
[all …]
DKAnonSignJoinBackgroundJobWorkerTest.java110 CountDownLatch countDownLatch = new CountDownLatch(1); in makeSignJoinCalls_nonZeroBackgroundCallBatchSize_makesSignJoinCalls() local
118 countDownLatch.countDown(); in makeSignJoinCalls_nonZeroBackgroundCallBatchSize_makesSignJoinCalls()
121 countDownLatch.await(); in makeSignJoinCalls_nonZeroBackgroundCallBatchSize_makesSignJoinCalls()
141 CountDownLatch countDownLatch = new CountDownLatch(1); in makeSignJoinCalls_zeroBackgroundCallBatchSize_doesNotMakeSignJoinCalls() local
149 countDownLatch.countDown(); in makeSignJoinCalls_zeroBackgroundCallBatchSize_doesNotMakeSignJoinCalls()
152 countDownLatch.await(); in makeSignJoinCalls_zeroBackgroundCallBatchSize_doesNotMakeSignJoinCalls()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/
DMeasurementServiceImplTest.java230 CountDownLatch countDownLatch = new CountDownLatch(1); in registerSourceAndAssertSuccess() local
240 countDownLatch.countDown(); in registerSourceAndAssertSuccess()
247 assertThat(countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)).isTrue(); in registerSourceAndAssertSuccess()
262 final CountDownLatch countDownLatch = new CountDownLatch(1); in registerSourceAndAssertFailure() local
274 countDownLatch.countDown(); in registerSourceAndAssertFailure()
278 assertThat(countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)).isTrue(); in registerSourceAndAssertFailure()
457 CountDownLatch countDownLatch = new CountDownLatch(1); in registerTriggerAndAssertSuccess() local
467 countDownLatch.countDown(); in registerTriggerAndAssertSuccess()
474 assertThat(countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS)).isTrue(); in registerTriggerAndAssertSuccess()
487 final CountDownLatch countDownLatch = new CountDownLatch(1); in registerTriggerAndAssertFailure() local
[all …]
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/debuggablects/
DMeasurementCtsDebuggableTest.java381 final CountDownLatch countDownLatch = new CountDownLatch(1); in executeRegisterSource() local
387 result -> countDownLatch.countDown()); in executeRegisterSource()
388 assertThat(countDownLatch.await(TIMEOUT_IN_MS, TimeUnit.MILLISECONDS)).isTrue(); in executeRegisterSource()
411 final CountDownLatch countDownLatch = new CountDownLatch(1); in executeRegisterTrigger() local
416 result -> countDownLatch.countDown()); in executeRegisterTrigger()
417 assertThat(countDownLatch.await(TIMEOUT_IN_MS, TimeUnit.MILLISECONDS)).isTrue(); in executeRegisterTrigger()
446 final CountDownLatch countDownLatch = new CountDownLatch(1); in executeRegisterWebSource() local
451 result -> countDownLatch.countDown()); in executeRegisterWebSource()
452 assertThat(countDownLatch.await(TIMEOUT_IN_MS, TimeUnit.MILLISECONDS)).isTrue(); in executeRegisterWebSource()
480 final CountDownLatch countDownLatch = new CountDownLatch(1); in executeRegisterWebTrigger() local
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/
DAttributionFallbackJobServiceTest.java464 CountDownLatch countDownLatch = new CountDownLatch(1); in onStartJob_featureDisabled() local
467 countDownLatch.countDown(); in onStartJob_featureDisabled()
480 countDownLatch.await(); in onStartJob_featureDisabled()
489 CountDownLatch countDownLatch = new CountDownLatch(1); in onStartJob_featureEnabled() local
492 countDownLatch.countDown(); in onStartJob_featureEnabled()
507 countDownLatch.await(); in onStartJob_featureEnabled()
526 CountDownLatch countDownLatch = new CountDownLatch(1); in onStartJob_shouldDisableJobTrue() local
529 countDownLatch.countDown(); in onStartJob_shouldDisableJobTrue()
541 countDownLatch.await(); in onStartJob_shouldDisableJobTrue()
598 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiShellCommand.java234 SoftApCallbackProxy(PrintWriter printWriter, CountDownLatch countDownLatch) { in SoftApCallbackProxy() argument
236 mCountDownLatch = countDownLatch; in SoftApCallbackProxy()
287 DppCallbackProxy(PrintWriter printWriter, CountDownLatch countDownLatch) { in DppCallbackProxy() argument
289 mCountDownLatch = countDownLatch; in DppCallbackProxy()
396 public WifiScorer(WifiServiceImpl wifiService, CountDownLatch countDownLatch) { in WifiScorer() argument
398 mCountDownLatch = countDownLatch; in WifiScorer()
823 CountDownLatch countDownLatch = new CountDownLatch(2); in onCommand() local
830 countDownLatch.countDown(); in onCommand()
836 countDownLatch.countDown(); in onCommand()
842 countDownLatch.countDown(); in onCommand()
[all …]
/packages/apps/Nfc/testutils/src/com/android/nfc/utils/
DNfcSnippet.java96 CountDownLatch countDownLatch = new CountDownLatch(1); in setNfcState() local
104 if (expectedState == state) countDownLatch.countDown(); in setNfcState()
114 if (!countDownLatch.await(5, TimeUnit.SECONDS)) { in setNfcState()
/packages/modules/AdServices/sdksandbox/tests/testutils/src/android/app/sdksandbox/testutils/
DConfigListener.java29 public void setLatchForProperty(CountDownLatch countDownLatch, String propertyName) { in setLatchForProperty() argument
30 mLatch = countDownLatch; in setLatchForProperty()
/packages/modules/AdServices/adservices/libraries/health/runners/concurrent-longevity/adservices/src/android/adservices/test/longevity/concurrent/
DScheduledScenarioRunner.java194 final CountDownLatch countDownLatch = new CountDownLatch(1); in suspensionAwareSleep() local
201 countDownLatch.countDown(); in suspensionAwareSleep()
216 countDownLatch.await(countDownLatchTimeoutMs, MILLISECONDS); in suspensionAwareSleep()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DPermissionUpdateListenerTest.java103 final CountDownLatch countDownLatch = new CountDownLatch(1); in testGrantPermissionInvokesOldCallback() local
107 countDownLatch.countDown(); in testGrantPermissionInvokesOldCallback()
116 countDownLatch.await(TIMEOUT, TimeUnit.MILLISECONDS); in testGrantPermissionInvokesOldCallback()
121 assertThat(countDownLatch.getCount()).isEqualTo(0); in testGrantPermissionInvokesOldCallback()
/packages/apps/Settings/tests/unit/src/com/android/settings/accessibility/
DDisableAnimationsPreferenceControllerTest.java170 CountDownLatch countDownLatch = new CountDownLatch(TOGGLE_ANIMATION_TARGETS.size()); in setAnimationScaleAndWaitForUpdate() local
174 countDownLatch.countDown(); in setAnimationScaleAndWaitForUpdate()
186 countDownLatch.await(5, TimeUnit.SECONDS); in setAnimationScaleAndWaitForUpdate()
/packages/apps/Settings/tests/unit/src/com/android/settings/development/
DBackAnimationPreferenceControllerTest.java152 CountDownLatch countDownLatch = new CountDownLatch(1); in doAndWaitForSettingChange() local
157 countDownLatch.countDown(); in doAndWaitForSettingChange()
166 countDownLatch.await(500, TimeUnit.MILLISECONDS); in doAndWaitForSettingChange()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/
DDebugReportingJobServiceTest.java438 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
439 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
440 return countDownLatch; in createCountDownLatch()
443 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
444 countDownLatch.countDown(); in countDown()
DDebugReportingFallbackJobServiceTest.java520 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
521 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
522 return countDownLatch; in createCountDownLatch()
525 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
526 countDownLatch.countDown(); in countDown()
DEventFallbackReportingJobServiceTest.java557 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
558 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
559 return countDownLatch; in createCountDownLatch()
562 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
563 countDownLatch.countDown(); in countDown()
DVerboseDebugReportingFallbackJobServiceTest.java533 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
534 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
535 return countDownLatch; in createCountDownLatch()
538 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
539 countDownLatch.countDown(); in countDown()
DEventReportingJobServiceTest.java538 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
539 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
540 return countDownLatch; in createCountDownLatch()
543 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
544 countDownLatch.countDown(); in countDown()
DAggregateFallbackReportingJobServiceTest.java567 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
568 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
569 return countDownLatch; in createCountDownLatch()
572 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
573 countDownLatch.countDown(); in countDown()
/packages/services/Car/car-lib/src/com/android/car/internal/util/
DConcurrentUtils.java112 public static void waitForCountDownNoInterrupt(CountDownLatch countDownLatch, long timeoutMs,
115 if (!countDownLatch.await(timeoutMs, TimeUnit.MILLISECONDS)) {
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/
DAsyncRegistrationFallbackJobServiceTest.java539 final CountDownLatch countDownLatch = new CountDownLatch(1); in createCountDownLatch() local
540 doAnswer(i -> countDown(countDownLatch)).when(mSpyService).jobFinished(any(), anyBoolean()); in createCountDownLatch()
541 return countDownLatch; in createCountDownLatch()
544 private Object countDown(CountDownLatch countDownLatch) { in countDown() argument
545 countDownLatch.countDown(); in countDown()

123