Home
last modified time | relevance | path

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

12

/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/carservice_unit_test/src/com/android/car/
DCarPowerManagementServiceTest.java664 int lastState, long timeoutMs, int expectedParamForShutdownOrSuspend) throws Exception { in assertStateReceivedForShutdownOrSleepWithPostpone() argument
669 int[] state = mPowerHal.waitForSend(timeoutMs); in assertStateReceivedForShutdownOrSleepWithPostpone()
680 private static void waitForSemaphore(Semaphore semaphore, long timeoutMs) in waitForSemaphore() argument
682 if (!semaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForSemaphore()
768 public boolean waitForDisplayStateChange(long timeoutMs) throws Exception { in waitForDisplayStateChange() argument
769 waitForSemaphore(mDisplayStateWait, timeoutMs); in waitForDisplayStateChange()
797 public void waitForShutdown(long timeoutMs) throws Exception { in waitForShutdown() argument
798 waitForSemaphore(mShutdownWait, timeoutMs); in waitForShutdown()
811 public void waitForSleepEntryAndWakeup(long timeoutMs) throws Exception { in waitForSleepEntryAndWakeup() argument
812 waitForSemaphore(mSleepWait, timeoutMs); in waitForSleepEntryAndWakeup()
[all …]
DSystemStateInterfaceTest.java87 public int forceSuspend(int timeoutMs) { in forceSuspend() argument
93 public int forceSuspend(int timeoutMs) { in forceSuspend() argument
DMockedPowerHalService.java96 public synchronized int[] waitForSend(long timeoutMs) throws Exception { in waitForSend() argument
98 wait(timeoutMs); in waitForSend()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DAppFocusTest.java60 public boolean waitForFocusChangeAndAssert(long timeoutMs, int expectedAppType, in waitForFocusChangeAndAssert() argument
62 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
87 public boolean waitForOwnershipLossAndAssert(long timeoutMs, int expectedLossAppType) in waitForOwnershipLossAndAssert() argument
89 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
96 public boolean waitForOwnershipGrantAndAssert(long timeoutMs, int expectedGrantAppType) in waitForOwnershipGrantAndAssert() argument
98 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
DCarPowerManagementTest.java379 private void waitForSubscription(long timeoutMs) throws Exception { in waitForSubscription() argument
380 if (!mSubscriptionWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForSubscription()
385 private LinkedList<int[]> waitForStateSetAndGetAll(long timeoutMs, int expectedSet) in waitForStateSetAndGetAll() argument
388 if (!mSetWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForStateSetAndGetAll()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/password/
DConfirmLockPassword.java362 public void onVerified(byte[] token, int timeoutMs) { in startVerifyPassword()
373 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startVerifyPassword()
393 public void onChecked(boolean matched, int timeoutMs) { in startCheckPassword()
402 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startCheckPassword()
433 private void onPasswordChecked(boolean matched, Intent intent, int timeoutMs, in onPasswordChecked() argument
445 if (timeoutMs > 0) { in onPasswordChecked()
448 effectiveUserId, timeoutMs); in onPasswordChecked()
460 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
462 onPasswordChecked(matched, intent, timeoutMs, effectiveUserId, newResult); in onCredentialChecked()
DConfirmLockPattern.java431 public void onVerified(byte[] token, int timeoutMs) {
442 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
470 public void onChecked(boolean matched, int timeoutMs) {
478 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
485 private void onPatternChecked(boolean matched, Intent intent, int timeoutMs, in onPatternChecked() argument
497 if (timeoutMs > 0) { in onPatternChecked()
500 effectiveUserId, timeoutMs); in onPatternChecked()
513 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
515 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/Settings/src/com/android/settings/password/
DConfirmLockPassword.java362 public void onVerified(byte[] token, int timeoutMs) { in startVerifyPassword()
373 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startVerifyPassword()
393 public void onChecked(boolean matched, int timeoutMs) { in startCheckPassword()
402 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs, in startCheckPassword()
433 private void onPasswordChecked(boolean matched, Intent intent, int timeoutMs, in onPasswordChecked() argument
445 if (timeoutMs > 0) { in onPasswordChecked()
448 effectiveUserId, timeoutMs); in onPasswordChecked()
460 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
462 onPasswordChecked(matched, intent, timeoutMs, effectiveUserId, newResult); in onCredentialChecked()
DConfirmLockPattern.java431 public void onVerified(byte[] token, int timeoutMs) {
442 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
470 public void onChecked(boolean matched, int timeoutMs) {
478 mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
485 private void onPatternChecked(boolean matched, Intent intent, int timeoutMs, in onPatternChecked() argument
497 if (timeoutMs > 0) { in onPatternChecked()
500 effectiveUserId, timeoutMs); in onPatternChecked()
513 public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs, in onCredentialChecked() argument
515 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/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarAppFocusManagerTest.java302 boolean waitForFocusChangeAndAssert(long timeoutMs, int expectedAppType, in waitForFocusChangeAndAssert() argument
305 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
336 boolean waitForOwnershipLossAndAssert(long timeoutMs, int expectedAppType) in waitForOwnershipLossAndAssert() argument
338 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
345 boolean waitForOwnershipGrantAndAssert(long timeoutMs, int expectedAppType) in waitForOwnershipGrantAndAssert() argument
347 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
DCarApiTestBase.java62 public void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
63 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarSensorManagerTest.java57 private void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
58 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarPackageManagerTest.java58 private void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
59 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarDiagnosticManagerTest.java59 private void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
60 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarTest.java59 private void waitForConnection(long timeoutMs) throws InterruptedException { in waitForConnection() argument
60 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dp/
DA2dpServiceTest.java176 private void verifyConnectionStateIntent(int timeoutMs, BluetoothDevice device, in verifyConnectionStateIntent() argument
178 Intent intent = TestUtils.waitForIntent(timeoutMs, mConnectionStateChangedQueue); in verifyConnectionStateIntent()
188 private void verifyNoConnectionStateIntent(int timeoutMs) { in verifyNoConnectionStateIntent() argument
189 Intent intent = TestUtils.waitForNoIntent(timeoutMs, mConnectionStateChangedQueue); in verifyNoConnectionStateIntent()
193 private void verifyAudioStateIntent(int timeoutMs, BluetoothDevice device, in verifyAudioStateIntent() argument
195 Intent intent = TestUtils.waitForIntent(timeoutMs, mAudioStateChangedQueue); in verifyAudioStateIntent()
204 private void verifyNoAudioStateIntent(int timeoutMs) { in verifyNoAudioStateIntent() argument
205 Intent intent = TestUtils.waitForNoIntent(timeoutMs, mAudioStateChangedQueue); in verifyNoAudioStateIntent()
209 private void verifyCodecConfigIntent(int timeoutMs, BluetoothDevice device, in verifyCodecConfigIntent() argument
211 Intent intent = TestUtils.waitForIntent(timeoutMs, mCodecConfigChangedQueue); in verifyCodecConfigIntent()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hid/
DHidDeviceTest.java174 private Intent waitForIntent(int timeoutMs, BlockingQueue<Intent> queue) { in waitForIntent() argument
176 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.java207 public static Intent waitForIntent(int timeoutMs, BlockingQueue<Intent> queue) { in waitForIntent() argument
209 Intent intent = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in waitForIntent()
226 public static Intent waitForNoIntent(int timeoutMs, BlockingQueue<Intent> queue) { in waitForNoIntent() argument
228 Intent intent = queue.poll(timeoutMs, TimeUnit.MILLISECONDS); in waitForNoIntent()
/packages/modules/DnsResolver/
DDnsTlsSocket.cpp59 int waitForReading(int fd, int timeoutMs = -1) { in waitForReading() argument
61 return TEMP_FAILURE_RETRY(poll(&fds, 1, timeoutMs)); in waitForReading()
64 int waitForWriting(int fd, int timeoutMs = -1) { in waitForWriting() argument
66 return TEMP_FAILURE_RETRY(poll(&fds, 1, timeoutMs)); in waitForWriting()
/packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/
DE2eCarTestBase.java125 void waitForConnection(long timeoutMs) { in waitForConnection() argument
126 mConnectionWait.block(timeoutMs); in waitForConnection()
/packages/modules/NetworkStack/src/com/android/networkstack/util/
DDnsUtils.java100 int timeoutMs, @Nullable final DnsLogFunc logger) throws UnknownHostException { in getAllByName() argument
144 result = resultRef.get(timeoutMs, TimeUnit.MILLISECONDS); in getAllByName()

12