Home
last modified time | relevance | path

Searched refs:timeoutMs (Results 1 – 25 of 108) sorted by relevance

12345

/packages/services/Car/car-test-lib/src/android/car/test/mocks/
DJavaMockitoHelper.java46 public static void await(@NonNull CountDownLatch latch, long timeoutMs) in await() argument
48 if (!latch.await(timeoutMs, TimeUnit.MILLISECONDS)) { in await()
49 throw new IllegalStateException(latch + " not called in " + timeoutMs + " ms"); in await()
60 public static void await(@NonNull Semaphore semaphore, long timeoutMs) in await() argument
62 if (!semaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in await()
63 throw new IllegalStateException(semaphore + " not released in " + timeoutMs + " ms"); in await()
74 public static boolean silentAwait(@NonNull CountDownLatch latch, long timeoutMs) { in silentAwait() argument
77 called = latch.await(timeoutMs, TimeUnit.MILLISECONDS); in silentAwait()
79 Log.w(TAG, latch + " not called in " + timeoutMs + " ms"); in silentAwait()
103 public static <T> T getResult(@NonNull Future<T> future, long timeoutMs, in getResult() argument
[all …]
DBlockingAnswer.java61 private BlockingAnswer(long timeoutMs, @NonNull Visitor<InvocationOnMock> invocator, in BlockingAnswer() argument
63 mTimeoutMs = timeoutMs; in BlockingAnswer()
83 public static BlockingAnswer<Void> forVoidReturn(long timeoutMs, in forVoidReturn() argument
85 return new BlockingAnswer<Void>(timeoutMs, invocator, /* value= */ null); in forVoidReturn()
96 public static <T> BlockingAnswer<T> forReturn(long timeoutMs, in forReturn() argument
98 return new BlockingAnswer<T>(timeoutMs, invocator, value); in forReturn()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DAppFocusTest.java67 private boolean waitForFocusChangeAndAssert(long timeoutMs, int expectedAppType, in waitForFocusChangeAndAssert() argument
69 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
98 public boolean waitForOwnershipLossAndAssert(long timeoutMs, int expectedLossAppType) in waitForOwnershipLossAndAssert() argument
100 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
107 public boolean waitForOwnershipGrantAndAssert(long timeoutMs, int expectedGrantAppType) in waitForOwnershipGrantAndAssert() argument
109 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarApiTestBase.java146 public void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
147 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
196 protected static void waitForLogcatMessage(String cmd, String match, int timeoutMs) { in waitForLogcatMessage() argument
212 if ((SystemClock.elapsedRealtime() - startTime) > timeoutMs) { in waitForLogcatMessage()
213 fail("logcat message(%s) not found in %d ms", match, timeoutMs); in waitForLogcatMessage()
221 protected static boolean waitUntil(String msg, long timeoutMs, in waitUntil() argument
223 long deadline = SystemClock.elapsedRealtime() + timeoutMs; in waitUntil()
236 fail("%s after %d ms", msg, timeoutMs); in waitUntil()
DCarAppFocusManagerTest.java341 boolean waitForFocusChangeAndAssert(long timeoutMs, int expectedAppType, in waitForFocusChangeAndAssert() argument
343 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
382 boolean waitForOwnershipLossAndAssert(long timeoutMs, int expectedAppType) in waitForOwnershipLossAndAssert() argument
384 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
391 boolean waitForOwnershipGrantAndAssert(long timeoutMs, int expectedAppType) in waitForOwnershipGrantAndAssert() argument
393 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
/packages/services/Car/service/src/com/android/car/hal/
DUserHalService.java310 public void getInitialUserInfo(int requestType, int timeoutMs, UsersInfo usersInfo, in getInitialUserInfo() argument
313 Preconditions.checkArgumentPositive(timeoutMs, "timeout must be positive"); in getInitialUserInfo()
334 EventLogHelper.writeCarUserHalInitialUserInfoReq(requestId, requestType, timeoutMs); in getInitialUserInfo()
337 getInitialUserInfoRequestTypeForStatsd(requestType), timeoutMs); in getInitialUserInfo()
339 sendHalRequest(requestId, timeoutMs, propRequest, callback); in getInitialUserInfo()
364 private void sendHalRequest(int requestId, int timeoutMs, HalPropValue request, in sendHalRequest() argument
366 mHandler.postDelayed(() -> handleCheckIfRequestTimedOut(requestId), requestId, timeoutMs); in sendHalRequest() local
387 public void switchUser(SwitchUserRequest request, int timeoutMs, in switchUser() argument
389 Preconditions.checkArgumentPositive(timeoutMs, "timeout must be positive"); in switchUser()
405 request.targetUser.flags, timeoutMs); in switchUser()
[all …]
/packages/services/Car/car-lib/src/android/car/
DICarUserService.aidl31 void switchUser(int targetUserId, int timeoutMs, in AndroidFuture<UserSwitchResult> receiver); in switchUser() argument
32 void logoutUser(int timeoutMs, in AndroidFuture<UserSwitchResult> receiver); in logoutUser() argument
34 void createUser(@nullable String name, String userType, int flags, int timeoutMs, in createUser() argument
42 void setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, in setUserIdentificationAssociation() argument
/packages/modules/Connectivity/tests/integration/util/com/android/server/
DNetworkAgentWrapper.java310 public void expectPreventReconnectReceived(long timeoutMs) { in expectPreventReconnectReceived() argument
311 assertTrue(mPreventReconnectReceived.block(timeoutMs)); in expectPreventReconnectReceived()
314 public void expectDisconnected(long timeoutMs) { in expectDisconnected() argument
315 assertTrue(mDisconnected.block(timeoutMs)); in expectDisconnected()
318 public void assertNotDisconnected(long timeoutMs) { in assertNotDisconnected() argument
319 assertFalse(mDisconnected.block(timeoutMs)); in assertNotDisconnected()
366 public void waitForIdle(long timeoutMs) { in waitForIdle() argument
367 HandlerUtils.waitForIdle(mHandlerThread, timeoutMs); in waitForIdle()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hfp/
DHeadsetTestUtils.java117 HeadsetCallState headsetCallState, int timeoutMs) { in verifyPhoneStateChangeSetters() argument
118 verify(headsetPhoneState, timeout(timeoutMs).times(1)).setNumActiveCall( in verifyPhoneStateChangeSetters()
120 verify(headsetPhoneState, timeout(timeoutMs).times(1)).setNumHeldCall( in verifyPhoneStateChangeSetters()
122 verify(headsetPhoneState, timeout(timeoutMs).times(1)).setCallState( in verifyPhoneStateChangeSetters()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/oem/
DCarOemProxyServiceTest.java242 int timeoutMs = 2000; in waitForHandlerThreadToFinish() local
243 assertWithMessage("handler not idle in %sms", timeoutMs) in waitForHandlerThreadToFinish()
244 .that(mHandler.runWithScissors(() -> {}, timeoutMs)).isTrue(); in waitForHandlerThreadToFinish()
265 private void mockCallTimeout(int timeoutMs) { in mockCallTimeout() argument
267 .thenReturn(timeoutMs); in mockCallTimeout()
269 .thenReturn(timeoutMs); in mockCallTimeout()
DCarOemAudioVolumeProxyServiceTest.java92 private void mockCallTimeout(int timeoutMs) { in mockCallTimeout() argument
94 .thenReturn(timeoutMs); in mockCallTimeout()
96 .thenReturn(timeoutMs); in mockCallTimeout()
DCarOemAudioDuckingProxyServiceTest.java92 private void mockCallTimeout(int timeoutMs) { in mockCallTimeout() argument
94 .thenReturn(timeoutMs); in mockCallTimeout()
96 .thenReturn(timeoutMs); in mockCallTimeout()
/packages/services/Car/service/src/com/android/car/power/
DCarPowerManagementService.java803 long timeoutMs = getPreShutdownPrepareTimeoutConfig(); in handlePreShutdownPrepare() local
805 sendPowerManagerEvent(state, timeoutMs); in handlePreShutdownPrepare()
814 waitForCompletionWithShutdownPostpone(state, timeoutMs, taskAtCompletion, intervalMs); in handlePreShutdownPrepare()
829 long timeoutMs; in doShutdownPrepare() local
832 timeoutMs = mShutdownPrepareTimeMs; in doShutdownPrepare()
840 timeoutMs = shutdownPrepareTimeOverrideInSecs * 1000L; in doShutdownPrepare()
844 sendPowerManagerEvent(CarPowerManager.STATE_SHUTDOWN_PREPARE, timeoutMs); in doShutdownPrepare()
846 waitForShutdownPrepareListenersToComplete(timeoutMs, intervalMs); in doShutdownPrepare()
850 int timeoutMs = getShutdownEnterTimeoutConfig(); in handleWaitForFinish() local
851 sendPowerManagerEvent(state.mCarPowerStateListenerState, timeoutMs); in handleWaitForFinish()
[all …]
/packages/apps/Settings/src/com/android/settings/password/
DConfirmLockPattern.java486 (response, timeoutMs) -> {
499 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
526 public void onChecked(boolean matched, int timeoutMs) {
532 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
539 private void onPatternChecked(boolean matched, Intent intent, int timeoutMs, in onPatternChecked() argument
551 if (timeoutMs > 0) { in onPatternChecked()
554 effectiveUserId, timeoutMs); in onPatternChecked()
567 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
569 onPatternChecked(matched, intent, timeoutMs, effectiveUserId, newResult); in onCredentialChecked()
DConfirmLockPassword.java451 final LockPatternChecker.OnVerifyCallback onVerifyCallback = (response, timeoutMs) -> { in startVerifyPassword()
464 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startVerifyPassword()
483 public void onChecked(boolean matched, int timeoutMs) { in startCheckPassword()
489 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startCheckPassword()
520 private void onPasswordChecked(boolean matched, Intent intent, int timeoutMs, in onPasswordChecked() argument
532 if (timeoutMs > 0) { in onPasswordChecked()
535 effectiveUserId, timeoutMs); in onPasswordChecked()
547 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
549 onPasswordChecked(matched, intent, timeoutMs, effectiveUserId, newResult); in onCredentialChecked()
DCredentialCheckResultTracker.java55 public void setResult(boolean matched, Intent intent, int timeoutMs, int effectiveUserId) { in setResult() argument
58 mResultTimeoutMs = timeoutMs; in setResult()
78 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/
DGetPermissionGroupInfoTest.kt33 private val timeoutMs: Long = 10000 constant in com.android.permissioncontroller.permission.GetPermissionGroupInfoTest
45 latch.await(timeoutMs, TimeUnit.MILLISECONDS) in assertAllPlatformPermGroupPermListsMatch()
63 latch.await(timeoutMs, TimeUnit.MILLISECONDS) in assertAllPlatformPermGroupsMatch()
/packages/modules/Virtualization/tests/hostside/helper/java/android/virt/test/
DVirtualizationTestCaseBase.java138 final long timeoutMs = 30000; // 30 sec. Microdroid is extremely slow on GCE-on-CF. in runOnMicrodroidRetryingOnFailure() local
141 .runTimedCmdRetry(timeoutMs, 500, attempts, in runOnMicrodroidRetryingOnFailure()
161 final long timeoutMs = 30000; // 30 sec. Microdroid is extremely slow on GCE-on-CF. in runOnMicrodroidForResult() local
163 .runTimedCmd(timeoutMs, "adb", "-s", MICRODROID_SERIAL, "shell", join(cmd)); in runOnMicrodroidForResult()
167 final long timeoutMs = 30000; // 30 sec. Microdroid is extremely slow on GCE-on-CF. in pullMicrodroidFile() local
171 timeoutMs, in pullMicrodroidFile()
/packages/apps/Car/Settings/src/com/android/car/settings/security/
DConfirmLockLockoutHelper.java68 public void onCheckCompletedWithTimeout(int timeoutMs) { in onCheckCompletedWithTimeout() argument
69 if (timeoutMs <= 0) { in onCheckCompletedWithTimeout()
73 long deadline = mLockPatternUtils.setLockoutAttemptDeadline(mUserId, timeoutMs); in onCheckCompletedWithTimeout()
DConfirmLockPatternFragment.java180 private void onCheckCompleted(boolean lockMatched, int timeoutMs) { in onCheckCompleted() argument
184 if (timeoutMs > 0) { in onCheckCompleted()
185 mConfirmLockLockoutHelper.onCheckCompletedWithTimeout(timeoutMs); in onCheckCompleted()
/packages/services/Car/service/src/com/android/car/oem/
DCarOemProxyServiceHelper.java204 long timeoutMs) throws TimeoutException { in doBinderTimedCallWithTimeout() argument
213 return result.get(timeoutMs, TimeUnit.MILLISECONDS); in doBinderTimedCallWithTimeout()
457 int timeoutMs = 2000; in crashCarService() local
462 stack = result.get(timeoutMs, TimeUnit.MILLISECONDS); in crashCarService()
465 Slogf.e(TAG, "Didn't received OEM stack within %d milliseconds.\n", timeoutMs); in crashCarService()
/packages/modules/Connectivity/tests/cts/net/api23Test/src/android/net/cts/api23test/
DConnectivityManagerApi23Test.java118 Intent intent, int timeoutMs) throws InterruptedException { in sendOrderedBroadcastAndReturnResultCode() argument
127 Integer resultCode = result.poll(timeoutMs, TimeUnit.MILLISECONDS); in sendOrderedBroadcastAndReturnResultCode()
128 assertNotNull("Timed out (more than " + timeoutMs + in sendOrderedBroadcastAndReturnResultCode()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/power/
DCarPowerManagementServiceUnitTest.java1050 private static void waitForSemaphore(Semaphore semaphore, long timeoutMs) in waitForSemaphore() argument
1052 if (!semaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForSemaphore()
1102 private void waitForDisplayOn(long timeoutMs) throws Exception { in waitForDisplayOn() argument
1103 waitForDisplayState(true, timeoutMs); in waitForDisplayOn()
1106 private void waitForDisplayOff(long timeoutMs) throws Exception { in waitForDisplayOff() argument
1107 waitForDisplayState(false, timeoutMs); in waitForDisplayOff()
1110 private void waitForDisplayState(boolean desiredState, long timeoutMs) throws Exception { in waitForDisplayState() argument
1119 waitForSemaphore(mDisplayStateWait, timeoutMs); in waitForDisplayState()
1156 public void waitForShutdown(long timeoutMs) throws Exception { in waitForShutdown() argument
1157 waitForSemaphore(mShutdownWait, timeoutMs); in waitForShutdown()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dp/
DA2dpServiceTest.java175 private void verifyConnectionStateIntent(int timeoutMs, BluetoothDevice device, in verifyConnectionStateIntent() argument
177 Intent intent = TestUtils.waitForIntent(timeoutMs, mConnectionStateChangedQueue); in verifyConnectionStateIntent()
187 private void verifyNoConnectionStateIntent(int timeoutMs) { in verifyNoConnectionStateIntent() argument
188 Intent intent = TestUtils.waitForNoIntent(timeoutMs, mConnectionStateChangedQueue); in verifyNoConnectionStateIntent()
192 private void verifyAudioStateIntent(int timeoutMs, BluetoothDevice device, in verifyAudioStateIntent() argument
194 Intent intent = TestUtils.waitForIntent(timeoutMs, mAudioStateChangedQueue); in verifyAudioStateIntent()
203 private void verifyNoAudioStateIntent(int timeoutMs) { in verifyNoAudioStateIntent() argument
204 Intent intent = TestUtils.waitForNoIntent(timeoutMs, mAudioStateChangedQueue); in verifyNoAudioStateIntent()
208 private void verifyCodecConfigIntent(int timeoutMs, BluetoothDevice device, in verifyCodecConfigIntent() argument
210 Intent intent = TestUtils.waitForIntent(timeoutMs, mCodecConfigChangedQueue); in verifyCodecConfigIntent()
[all …]
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioUtils.java27 static boolean hasExpired(long startTimeMs, long currentTimeMs, int timeoutMs) { in hasExpired() argument
28 return (currentTimeMs - startTimeMs) > timeoutMs; in hasExpired()

12345