Home
last modified time | relevance | path

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

1234

/packages/services/Car/car-test-lib/src/android/car/test/mocks/
DJavaMockitoHelper.java44 public static void await(@NonNull CountDownLatch latch, long timeoutMs) in await() argument
46 if (!latch.await(timeoutMs, TimeUnit.MILLISECONDS)) { in await()
47 throw new IllegalStateException(latch + " not called in " + timeoutMs + " ms"); in await()
58 public static void await(@NonNull Semaphore semaphore, long timeoutMs) in await() argument
60 if (!semaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in await()
61 throw new IllegalStateException(semaphore + " not released in " + timeoutMs + " ms"); in await()
72 public static boolean silentAwait(@NonNull CountDownLatch latch, long timeoutMs) { in silentAwait() argument
75 called = latch.await(timeoutMs, TimeUnit.MILLISECONDS); in silentAwait()
77 Log.w(TAG, latch + " not called in " + timeoutMs + " ms"); in silentAwait()
100 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()
DAndroidMockitoHelper.java272 public static <T> T syncCallOnMainThread(long timeoutMs, Callable<T> callable) in syncCallOnMainThread() argument
299 JavaMockitoHelper.await(latch, timeoutMs); in syncCallOnMainThread()
323 public static void syncRunOnUiThread(long timeoutMs, Activity activity, Runnable runnable) in syncRunOnUiThread() argument
330 JavaMockitoHelper.await(latch, timeoutMs); in syncRunOnUiThread()
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DNetlinkSocket.java116 private static void checkTimeout(long timeoutMs) { in checkTimeout() argument
117 if (timeoutMs < 0) { in checkTimeout()
128 public static ByteBuffer recvMessage(FileDescriptor fd, int bufsize, long timeoutMs) in recvMessage() argument
130 checkTimeout(timeoutMs); in recvMessage()
132 Os.setsockoptTimeval(fd, SOL_SOCKET, SO_RCVTIMEO, StructTimeval.fromMillis(timeoutMs)); in recvMessage()
152 FileDescriptor fd, byte[] bytes, int offset, int count, long timeoutMs) in sendMessage() argument
154 checkTimeout(timeoutMs); in sendMessage()
155 Os.setsockoptTimeval(fd, SOL_SOCKET, SO_SNDTIMEO, StructTimeval.fromMillis(timeoutMs)); in sendMessage()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarApiTestBase.java130 public void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
131 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
179 protected static void waitForLogcatMessage(String cmd, String match, int timeoutMs) { in waitForLogcatMessage() argument
195 if ((SystemClock.elapsedRealtime() - startTime) > timeoutMs) { in waitForLogcatMessage()
196 fail("match was not found, Timeout: " + timeoutMs + " ms"); in waitForLogcatMessage()
204 protected static boolean waitUntil(String msg, long timeoutMs, in waitUntil() argument
206 long deadline = SystemClock.elapsedRealtime() + timeoutMs; in waitUntil()
219 fail(msg + " after: " + timeoutMs + "ms"); in waitUntil()
DCarAppFocusManagerTest.java307 boolean waitForFocusChangeAndAssert(long timeoutMs, int expectedAppType, in waitForFocusChangeAndAssert() argument
310 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
350 boolean waitForOwnershipLossAndAssert(long timeoutMs, int expectedAppType) in waitForOwnershipLossAndAssert() argument
352 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
359 boolean waitForOwnershipGrantAndAssert(long timeoutMs, int expectedAppType) in waitForOwnershipGrantAndAssert() argument
361 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DAppFocusTest.java61 private boolean waitForFocusChangeAndAssert(long timeoutMs, int expectedAppType, in waitForFocusChangeAndAssert() argument
63 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
92 public boolean waitForOwnershipLossAndAssert(long timeoutMs, int expectedLossAppType) in waitForOwnershipLossAndAssert() argument
94 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
101 public boolean waitForOwnershipGrantAndAssert(long timeoutMs, int expectedGrantAppType) in waitForOwnershipGrantAndAssert() argument
103 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
/packages/services/Car/service/src/com/android/car/hal/
DUserHalService.java298 public void getInitialUserInfo(int requestType, int timeoutMs, @NonNull UsersInfo usersInfo, in getInitialUserInfo() argument
301 Preconditions.checkArgumentPositive(timeoutMs, "timeout must be positive"); in getInitialUserInfo()
318 requestType, timeoutMs); in getInitialUserInfo()
321 getInitialUserInfoRequestTypeForStatsd(requestType), timeoutMs); in getInitialUserInfo()
323 sendHalRequest(requestId, timeoutMs, propRequest, callback); in getInitialUserInfo()
348 private void sendHalRequest(int requestId, int timeoutMs, @NonNull VehiclePropValue request, in sendHalRequest() argument
352 timeoutMs); in sendHalRequest() local
373 public void switchUser(@NonNull SwitchUserRequest request, int timeoutMs, in switchUser() argument
375 Preconditions.checkArgumentPositive(timeoutMs, "timeout must be positive"); in switchUser()
391 request.targetUser.userId, timeoutMs); in switchUser()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/power/
DCarPowerManagementServiceUnitTest.java676 private static void waitForSemaphore(Semaphore semaphore, long timeoutMs) in waitForSemaphore() argument
678 if (!semaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForSemaphore()
719 private void waitForDisplayOn(long timeoutMs) throws Exception { in waitForDisplayOn() argument
720 waitForDisplayState(true, timeoutMs); in waitForDisplayOn()
723 private void waitForDisplayOff(long timeoutMs) throws Exception { in waitForDisplayOff() argument
724 waitForDisplayState(false, timeoutMs); in waitForDisplayOff()
727 private void waitForDisplayState(boolean desiredState, long timeoutMs) throws Exception { in waitForDisplayState() argument
736 waitForSemaphore(mDisplayStateWait, timeoutMs); in waitForDisplayState()
769 public void waitForShutdown(long timeoutMs) throws Exception { in waitForShutdown() argument
770 waitForSemaphore(mShutdownWait, timeoutMs); in waitForShutdown()
[all …]
/packages/apps/Settings/src/com/android/settings/password/
DConfirmLockPassword.java413 final LockPatternChecker.OnVerifyCallback onVerifyCallback = (response, timeoutMs) -> { in startVerifyPassword()
426 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startVerifyPassword()
445 public void onChecked(boolean matched, int timeoutMs) { in startCheckPassword()
456 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startCheckPassword()
487 private void onPasswordChecked(boolean matched, Intent intent, int timeoutMs, in onPasswordChecked() argument
499 if (timeoutMs > 0) { in onPasswordChecked()
502 effectiveUserId, timeoutMs); in onPasswordChecked()
514 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
516 onPasswordChecked(matched, intent, timeoutMs, effectiveUserId, newResult); in onCredentialChecked()
DConfirmLockPattern.java457 (response, timeoutMs) -> {
470 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
497 public void onChecked(boolean matched, int timeoutMs) {
505 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
512 private void onPatternChecked(boolean matched, Intent intent, int timeoutMs, in onPatternChecked() argument
524 if (timeoutMs > 0) { in onPatternChecked()
527 effectiveUserId, timeoutMs); in onPatternChecked()
540 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
542 onPatternChecked(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/apps/Bluetooth/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/modules/Connectivity/tests/integration/util/com/android/server/
DNetworkAgentWrapper.java294 public void expectPreventReconnectReceived(long timeoutMs) { in expectPreventReconnectReceived() argument
295 assertTrue(mPreventReconnectReceived.block(timeoutMs)); in expectPreventReconnectReceived()
298 public void expectDisconnected(long timeoutMs) { in expectDisconnected() argument
299 assertTrue(mDisconnected.block(timeoutMs)); in expectDisconnected()
342 public void waitForIdle(long timeoutMs) { in waitForIdle() argument
343 HandlerUtils.waitForIdle(mHandlerThread, timeoutMs); in waitForIdle()
/packages/services/Car/car-lib/src/android/car/
DICarUserService.aidl33 void switchUser(int tagerUserId, int timeoutMs, in AndroidFuture<UserSwitchResult> receiver); in switchUser() argument
35 void createUser(@nullable String name, String userType, int flags, int timeoutMs, in createUser() argument
46 void setUserIdentificationAssociation(int timeoutMs, in int[] types, in int[] values, in setUserIdentificationAssociation() 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/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/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dp/
DA2dpServiceTest.java177 private void verifyConnectionStateIntent(int timeoutMs, BluetoothDevice device, in verifyConnectionStateIntent() argument
179 Intent intent = TestUtils.waitForIntent(timeoutMs, mConnectionStateChangedQueue); in verifyConnectionStateIntent()
189 private void verifyNoConnectionStateIntent(int timeoutMs) { in verifyNoConnectionStateIntent() argument
190 Intent intent = TestUtils.waitForNoIntent(timeoutMs, mConnectionStateChangedQueue); in verifyNoConnectionStateIntent()
194 private void verifyAudioStateIntent(int timeoutMs, BluetoothDevice device, in verifyAudioStateIntent() argument
196 Intent intent = TestUtils.waitForIntent(timeoutMs, mAudioStateChangedQueue); in verifyAudioStateIntent()
205 private void verifyNoAudioStateIntent(int timeoutMs) { in verifyNoAudioStateIntent() argument
206 Intent intent = TestUtils.waitForNoIntent(timeoutMs, mAudioStateChangedQueue); in verifyNoAudioStateIntent()
210 private void verifyCodecConfigIntent(int timeoutMs, BluetoothDevice device, in verifyCodecConfigIntent() argument
212 Intent intent = TestUtils.waitForIntent(timeoutMs, mCodecConfigChangedQueue); in verifyCodecConfigIntent()
[all …]
/packages/modules/Connectivity/tests/cts/net/api23Test/src/android/net/cts/api23test/
DConnectivityManagerApi23Test.java117 Intent intent, int timeoutMs) throws InterruptedException { in sendOrderedBroadcastAndReturnResultCode() argument
126 Integer resultCode = result.poll(timeoutMs, TimeUnit.MILLISECONDS); in sendOrderedBroadcastAndReturnResultCode()
127 assertNotNull("Timed out (more than " + timeoutMs + in sendOrderedBroadcastAndReturnResultCode()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hid/
DHidDeviceTest.java175 private Intent waitForIntent(int timeoutMs, BlockingQueue<Intent> queue) { in waitForIntent() argument
177 Intent intent = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in waitForIntent()
185 private void verifyConnectionStateIntent(int timeoutMs, BluetoothDevice device, int newState, in verifyConnectionStateIntent() argument
187 Intent intent = waitForIntent(timeoutMs, mConnectionStateChangedQueue); in verifyConnectionStateIntent()
196 private void verifyCallback(int timeoutMs, int callbackType, BlockingQueue<Integer> queue) { in verifyCallback() argument
198 Integer lastCallback = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in verifyCallback()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/
DTestUtils.java208 public static Intent waitForIntent(int timeoutMs, BlockingQueue<Intent> queue) { in waitForIntent() argument
210 Intent intent = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in waitForIntent()
227 public static Intent waitForNoIntent(int timeoutMs, BlockingQueue<Intent> queue) { in waitForNoIntent() argument
229 Intent intent = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in waitForNoIntent()
/packages/modules/Connectivity/tests/cts/hostside/app/src/com/android/cts/net/hostside/
DAbstractRestrictBackgroundNetworkTestCase.java235 protected String sendOrderedBroadcast(Intent intent, int timeoutMs) throws Exception { in sendOrderedBroadcast() argument
253 final String resultData = result.poll(timeoutMs, TimeUnit.MILLISECONDS); in sendOrderedBroadcast()
254 Log.d(TAG, "Ordered broadcast response after " + timeoutMs + "ms: " + resultData ); in sendOrderedBroadcast()
384 int timeoutMs = 500; in assertNetworkAccess() local
398 + "Sleeping " + timeoutMs + "ms before trying again"); in assertNetworkAccess()
404 SystemClock.sleep(timeoutMs); in assertNetworkAccess()
407 timeoutMs = Math.min(timeoutMs*2, NETWORK_TIMEOUT_MS); in assertNetworkAccess()
/packages/modules/Gki/test/src/com/android/gki/tests/
DGkiInstallTest.java285 private static void rebootUntilAvailable(ITestDevice device, long timeoutMs) in rebootUntilAvailable() argument
289 CLog.i("Device online, wait for device to be available for %d ms...", timeoutMs); in rebootUntilAvailable()
290 device.waitForDeviceAvailable(timeoutMs); in rebootUntilAvailable()
291 CLog.i("Device is available after %d ms", timeoutMs); in rebootUntilAvailable()
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioUtils.java23 static boolean hasExpired(long startTimeMs, long currentTimeMs, int timeoutMs) { in hasExpired() argument
24 return (currentTimeMs - startTimeMs) > timeoutMs; in hasExpired()

1234