Home
last modified time | relevance | path

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

12345

/frameworks/libs/net/common/testutils/devicetests/com/android/testutils/
DHandlerUtils.kt30 fun HandlerThread.waitForIdle(timeoutMs: Int) = threadHandler.waitForIdle(timeoutMs.toLong()) in HandlerThread()
31 fun HandlerThread.waitForIdle(timeoutMs: Long) = threadHandler.waitForIdle(timeoutMs) in HandlerThread()
32 fun Handler.waitForIdle(timeoutMs: Int) = waitForIdle(timeoutMs.toLong()) in HandlerThread()
33 fun Handler.waitForIdle(timeoutMs: Long) { in HandlerThread()
36 if (!cv.block(timeoutMs)) { in HandlerThread()
44 fun waitForIdleSerialExecutor(executor: Executor, timeoutMs: Long) { in waitForIdleSerialExecutor()
47 if (!cv.block(timeoutMs)) { in waitForIdleSerialExecutor()
DTestableNetworkCallback.kt178 constructor(timeoutMs: Long = DEFAULT_TIMEOUT): this(null, timeoutMs)
190 fun pollForNextCallback(timeoutMs: Long = defaultTimeoutMs): CallbackEntry { in pollForNextCallback()
191 return history.poll(timeoutMs) ?: fail("Did not receive callback after ${timeoutMs}ms") in pollForNextCallback()
199 fun assertNoCallback(timeoutMs: Long) { in assertNoCallback()
200 val cb = history.poll(timeoutMs) in assertNoCallback()
205 timeoutMs: Long = defaultTimeoutMs, in assertNoCallbackThat()
208 val cb = history.poll(timeoutMs) { valid(it) }.let { in assertNoCallbackThat()
217 timeoutMs: Long = defaultTimeoutMs in expectCallback()
218 ): T = pollForNextCallback(timeoutMs).let { in expectCallback()
230 timeoutMs: Long = defaultTimeoutMs, in eventuallyExpect()
[all …]
DTapPacketReader.java83 public byte[] popPacket(long timeoutMs) { in popPacket() argument
84 return poll(timeoutMs); in popPacket()
93 public byte[] popPacket(long timeoutMs, @NonNull Predicate<byte[]> filter) { in popPacket() argument
94 return poll(timeoutMs, filter); in popPacket()
101 public byte[] poll(long timeoutMs) { in poll() argument
102 return mReadHead.getValue().poll(timeoutMs, packet -> true); in poll()
109 public byte[] poll(long timeoutMs, @NonNull Predicate<byte[]> filter) { in poll() argument
110 return mReadHead.getValue().poll(timeoutMs, filter::test); in poll()
/frameworks/base/services/net/java/android/net/util/
DNetdService.java82 long timeoutMs = 0; in get() local
93 timeoutMs = Math.min(timeoutMs + BASE_TIMEOUT_MS, MAX_TIMEOUT_MS); in get()
94 timeoutMs = Math.min(timeoutMs, remaining); in get()
96 Thread.sleep(timeoutMs); in get()
/frameworks/base/services/backup/java/com/android/server/backup/remote/
DRemoteCall.java57 public static RemoteResult execute(RemoteCallable<IBackupCallback> callable, long timeoutMs) in execute() argument
59 return new RemoteCall(callable, timeoutMs).call(); in execute()
75 public RemoteCall(RemoteCallable<IBackupCallback> callable, long timeoutMs) { in RemoteCall() argument
76 this(false, callable, timeoutMs); in RemoteCall()
86 public RemoteCall(boolean cancelled, RemoteCallable<IBackupCallback> callable, long timeoutMs) { in RemoteCall() argument
88 mTimeoutMs = timeoutMs; in RemoteCall()
/frameworks/libs/net/common/testutils/hostdevice/com/android/net/module/util/
DTrackRecord.kt46 fun poll(timeoutMs: Long, pos: Int, predicate: (E) -> Boolean = { true }): E? in add()
103 override fun poll(timeoutMs: Long, pos: Int, predicate: (E) -> Boolean) = lock.withLock { in <lambda>()
104 elements.getOrNull(pollForIndexReadLocked(timeoutMs, pos, predicate)) in <lambda>()
115 private fun pollForIndexReadLocked(timeoutMs: Long, pos: Int, predicate: (E) -> Boolean): Int { in pollForIndexReadLocked()
116 val deadline = System.currentTimeMillis() + timeoutMs in pollForIndexReadLocked()
261 fun poll(timeoutMs: Long, predicate: (E) -> Boolean = { true }): E? { in newReadHead()
266 val index = pollForIndexReadLocked(timeoutMs, readHead, predicate) in newReadHead()
287 private fun Condition.await(timeoutMs: Long) = this.await(timeoutMs, TimeUnit.MILLISECONDS)
/frameworks/libs/net/common/device/com/android/net/module/util/netlink/
DNetlinkSocket.java132 private static void checkTimeout(long timeoutMs) { in checkTimeout() argument
133 if (timeoutMs < 0) { in checkTimeout()
144 public static ByteBuffer recvMessage(FileDescriptor fd, int bufsize, long timeoutMs) in recvMessage() argument
146 checkTimeout(timeoutMs); in recvMessage()
148 Os.setsockoptTimeval(fd, SOL_SOCKET, SO_RCVTIMEO, StructTimeval.fromMillis(timeoutMs)); in recvMessage()
168 FileDescriptor fd, byte[] bytes, int offset, int count, long timeoutMs) in sendMessage() argument
170 checkTimeout(timeoutMs); in sendMessage()
171 Os.setsockoptTimeval(fd, SOL_SOCKET, SO_SNDTIMEO, StructTimeval.fromMillis(timeoutMs)); in sendMessage()
/frameworks/ex/camera2/public/src/com/android/ex/camera2/blocking/
DBlockingSessionCallback.java139 public CameraCaptureSession waitAndGetSession(long timeoutMs) { in waitAndGetSession() argument
141 return mSessionFuture.get(timeoutMs, TimeUnit.MILLISECONDS); in waitAndGetSession()
144 String.format("Failed to get session after %s milliseconds", timeoutMs), e); in waitAndGetSession()
233 CameraCaptureSession session, Surface surface, long timeoutMs) { in waitForSurfacePrepared() argument
240 long waitTimeRemaining = timeoutMs; in waitForSurfacePrepared()
243 mPreparedSurfaces.wait(timeoutMs); in waitForSurfacePrepared()
253 "Unable to get Surface prepared in " + timeoutMs + "ms"); in waitForSurfacePrepared()
292 long timeoutMs = unit.convert(timeout, TimeUnit.MILLISECONDS); in get() local
293 if (!mCondVar.block(timeoutMs)) { in get()
DBlockingExtensionSessionCallback.java122 public CameraExtensionSession waitAndGetSession(long timeoutMs) { in waitAndGetSession() argument
124 return mSessionFuture.get(timeoutMs, TimeUnit.MILLISECONDS); in waitAndGetSession()
127 String.format("Failed to get session after %s milliseconds", timeoutMs), e); in waitAndGetSession()
192 long timeoutMs = unit.convert(timeout, TimeUnit.MILLISECONDS); in get() local
193 if (!mCondVar.block(timeoutMs)) { in get()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DActivityTestsBase.java143 public int waitForResultOrThrow(int timeoutMs) { in waitForResultOrThrow() argument
144 return waitForResultOrThrow(timeoutMs, null); in waitForResultOrThrow()
147 public int waitForResultOrThrow(int timeoutMs, String expected) { in waitForResultOrThrow() argument
148 int res = waitForResult(timeoutMs, expected); in waitForResultOrThrow()
163 public int waitForResult(int timeoutMs, String expected) { in waitForResult() argument
166 long endTime = System.currentTimeMillis() + timeoutMs; in waitForResult()
/frameworks/base/cmds/incidentd/src/
DSection.h44 const int64_t timeoutMs; // each section must have a timeout variable
47 Section(int id, int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS);
59 int64_t timeoutMs = 5000 /* 5 seconds */);
89 WorkerThreadSection(int id, int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS);
102 CommandSection(int id, int64_t timeoutMs, const char* command, ...);
187 TombstoneSection(int id, const char* type, int64_t timeoutMs = 120000 /* 2 minutes */);
DSection.cpp79 Section::Section(int i, int64_t timeoutMs) in Section() argument
81 timeoutMs(timeoutMs) { in Section()
89 FileSection::FileSection(int id, const char* filename, const int64_t timeoutMs) in FileSection() argument
90 : Section(id, timeoutMs), mFilename(filename) { in FileSection()
127 this->timeoutMs, mIsSysfs); in Execute()
208 fd.get(), std::move(p2cPipe.writeFd()), std::move(c2pPipe.readFd()), this->timeoutMs, in Execute()
252 WorkerThreadSection::WorkerThreadSection(int id, const int64_t timeoutMs) in WorkerThreadSection() argument
253 : Section(id, timeoutMs) {} in WorkerThreadSection()
291 err = buffer.read(data->pipe.readFd().get(), this->timeoutMs); in Execute()
331 CommandSection::CommandSection(int id, const int64_t timeoutMs, const char* command, ...) in CommandSection() argument
[all …]
/frameworks/base/core/java/android/os/
DConditionVariable.java117 public boolean block(long timeoutMs) in block() argument
122 if (timeoutMs != 0) { in block()
125 long end = now + timeoutMs; in block()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/animation/
DPhysicsAnimatorTestUtils.kt53 var timeoutMs: Long = 2000 in <lambda>() variable
73 timeoutMs = 2000 in <lambda>()
98 fun setBlockTimeout(timeoutMs: Long) { in <lambda>()
99 PhysicsAnimatorTestUtils.timeoutMs = timeoutMs in <lambda>()
147 latch.await(timeoutMs, TimeUnit.MILLISECONDS) in <lambda>()
198 latch.await(timeoutMs, TimeUnit.MILLISECONDS) in <lambda>()
462 unblockLatch.await(timeoutMs, TimeUnit.MILLISECONDS) in <lambda>()
482 unblockLatch.await(timeoutMs, TimeUnit.MILLISECONDS) in <lambda>()
/frameworks/ex/camera2/public/src/com/android/ex/camera2/utils/
DStateWaiter.java97 public void waitForState(int state, long timeoutMs) { in waitForState() argument
100 waitForAnyOfStates(Arrays.asList(stateArray), timeoutMs); in waitForState() local
120 public int waitForAnyOfStates(Collection<Integer> states, final long timeoutMs) { in waitForAnyOfStates() argument
136 long timeoutLeft = timeoutMs; in waitForAnyOfStates()
160 s.append(timeoutMs); in waitForAnyOfStates()
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DDispatchThread.java73 public void runJobSync(final Runnable job, Object waitLock, long timeoutMs, String jobMsg) { in runJobSync() argument
74 String timeoutMsg = "Timeout waiting " + timeoutMs + "ms for " + jobMsg; in runJobSync()
76 long timeoutBound = SystemClock.uptimeMillis() + timeoutMs; in runJobSync()
79 waitLock.wait(timeoutMs); in runJobSync()
DCameraStateHolder.java95 long timeoutMs) { in waitForCondition() argument
96 long timeBound = SystemClock.uptimeMillis() + timeoutMs; in waitForCondition()
100 this.wait(timeoutMs); in waitForCondition()
/frameworks/av/media/utils/fuzzers/
DTimeCheckFuzz.cpp37 uint32_t timeoutMs = in LLVMFuzzerTestOneInput() local
52 std::chrono::milliseconds(timeoutMs), in LLVMFuzzerTestOneInput()
55 uint8_t sleep_amount_ms = data_provider.ConsumeIntegralInRange<uint8_t>(0, timeoutMs / 2); in LLVMFuzzerTestOneInput()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardAbsKeyInputViewController.java171 void onPasswordChecked(int userId, boolean matched, int timeoutMs, boolean isValidPassword) { in onPasswordChecked() argument
182 getKeyguardSecurityCallback().reportUnlockAttempt(userId, false, timeoutMs); in onPasswordChecked()
183 if (timeoutMs > 0) { in onPasswordChecked()
185 userId, timeoutMs); in onPasswordChecked()
189 if (timeoutMs == 0) { in onPasswordChecked()
238 public void onChecked(boolean matched, int timeoutMs) { in verifyPasswordAndUnlock()
243 onPasswordChecked(userId, false /* matched */, timeoutMs, in verifyPasswordAndUnlock()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/temporarydisplay/
DTemporaryViewDisplayControllerTest.kt468 underTest.displayView(ViewInfo("First name", id = "id1", timeoutMs = 4000)) in multipleViews_mostRecentViewRemoved_otherViewsTimedOutAndNotDisplayed()
470 underTest.displayView(ViewInfo("Second name", id = "id2", timeoutMs = 4000)) in multipleViews_mostRecentViewRemoved_otherViewsTimedOutAndNotDisplayed()
472 underTest.displayView(ViewInfo("Third name", id = "id3", timeoutMs = 20000)) in multipleViews_mostRecentViewRemoved_otherViewsTimedOutAndNotDisplayed()
488 underTest.displayView(ViewInfo("First name", id = "id1", timeoutMs = 4000)) in multipleViews_mostRecentViewRemoved_viewWithShortTimeLeftNotDisplayed()
490 underTest.displayView(ViewInfo("Second name", id = "id2", timeoutMs = 2500)) in multipleViews_mostRecentViewRemoved_viewWithShortTimeLeftNotDisplayed()
550 timeoutMs = 10000 in lowerThenHigherPriority_lowerPriorityRedisplayed()
560 timeoutMs = 2000 in lowerThenHigherPriority_lowerPriorityRedisplayed()
594 timeoutMs = 1000 in lowerThenHigherPriority_lowerPriorityNotRedisplayedBecauseTimedOut()
604 timeoutMs = 2000 in lowerThenHigherPriority_lowerPriorityNotRedisplayedBecauseTimedOut()
662 timeoutMs = 3000, in higherThenLowerPriority_lowerEventuallyDisplayed()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/
DTimeoutHandler.java97 long timeoutMs = accessibilityManager.getRecommendedTimeoutMillis( in resetTimeout() local
101 sendMessageDelayed(obtainMessage(MESSAGE_CORNER_TIMEOUT), timeoutMs); in resetTimeout() local
103 Log.d(TAG, "dismiss timeout: " + timeoutMs + " ms"); in resetTimeout()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationInlineImageResolver.java143 private Drawable loadImageFromCache(Uri uri, long timeoutMs) { in loadImageFromCache() argument
148 return mImageCache.get(uri, timeoutMs); in loadImageFromCache()
226 void waitForPreloadedImages(long timeoutMs) { in waitForPreloadedImages() argument
233 long endTimeMs = SystemClock.elapsedRealtime() + timeoutMs; in waitForPreloadedImages()
255 Drawable get(Uri uri, long timeoutMs); in get() argument
/frameworks/libs/net/common/testutils/hostdevice/com/android/testutils/
DConcurrentUtils.kt28 fun CountDownLatch.await(timeoutMs: Long): Boolean = await(timeoutMs, TimeUnit.MILLISECONDS)
/frameworks/base/tests/SurfaceViewBufferTests/cpp/
DSurfaceProxy.cpp50 JNIEnv*, jclass, jlong jFrameNumber, jint timeoutMs) { in Java_com_android_test_SurfaceProxy_waitUntilBufferDisplayed() argument
71 timeoutMs) { in Java_com_android_test_SurfaceProxy_waitUntilBufferDisplayed()
124 jint timeoutMs) { in Java_com_android_test_SurfaceProxy_SurfaceDequeueBuffer() argument
133 if (timeoutMs == 0) { in Java_com_android_test_SurfaceProxy_SurfaceDequeueBuffer()
137 int waitResult = fence->wait(timeoutMs); in Java_com_android_test_SurfaceProxy_SurfaceDequeueBuffer()
212 JNIEnv* /* env */, jclass /* clazz */, jlong timeoutMs) { in Java_com_android_test_SurfaceProxy_SurfaceSetDequeueTimeout() argument
215 return surface->setDequeueTimeout(timeoutMs); in Java_com_android_test_SurfaceProxy_SurfaceSetDequeueTimeout()
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
DAuthCredentialPatternView.java84 private void onPatternVerified(@NonNull VerifyCredentialResponse response, int timeoutMs) { in onPatternVerified() argument
85 AuthCredentialPatternView.this.onCredentialVerified(response, timeoutMs); in onPatternVerified()
86 if (timeoutMs > 0) { in onPatternVerified()

12345