Home
last modified time | relevance | path

Searched refs:TimeUnit (Results 1 – 25 of 687) sorted by relevance

12345678910>>...28

/frameworks/base/tests/Codegen/src/com/android/codegentest/
DSampleWithCustomBuilder.java26 import java.util.concurrent.TimeUnit;
33 TimeUnit delayUnit = TimeUnit.MILLISECONDS;
64 public abstract Builder setDelayUnit(TimeUnit value); in setDelayUnit()
70 public Builder setDelay(long amount, TimeUnit unit) { in setDelay()
78 private static TimeUnit unparcelDelayUnit(Parcel p) { in unparcelDelayUnit()
79 return TimeUnit.values()[p.readInt()]; in unparcelDelayUnit()
104 @NonNull TimeUnit delayUnit, in SampleWithCustomBuilder()
121 public @NonNull TimeUnit getDelayUnit() { in getDelayUnit()
166 TimeUnit _delayUnit = unparcelDelayUnit(in); in SampleWithCustomBuilder()
200 private @NonNull TimeUnit delayUnit;
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DNitzDataTest.java27 import java.util.concurrent.TimeUnit;
40 assertEquals(TimeUnit.MINUTES.toMillis(4 * 15), nitz.getLocalOffsetMillis()); in testParse_beyond2038()
41 assertEquals(TimeUnit.MINUTES.toMillis(60), nitz.getDstAdjustmentMillis().longValue()); in testParse_beyond2038()
60 assertEquals(TimeUnit.MINUTES.toMillis(-1 * 15), nitz.getLocalOffsetMillis()); in testParse_withDst()
67 assertEquals(TimeUnit.MINUTES.toMillis(8 * 15), nitz.getLocalOffsetMillis()); in testParse_withDst()
68 assertEquals(TimeUnit.HOURS.toMillis(1), nitz.getDstAdjustmentMillis().longValue()); in testParse_withDst()
74 assertEquals(TimeUnit.MINUTES.toMillis(-8 * 15), nitz.getLocalOffsetMillis()); in testParse_withDst()
75 assertEquals(TimeUnit.HOURS.toMillis(1), nitz.getDstAdjustmentMillis().longValue()); in testParse_withDst()
85 assertEquals(TimeUnit.MINUTES.toMillis(4 * 15), nitz.getLocalOffsetMillis()); in testParse_noDstField()
92 assertEquals(TimeUnit.MINUTES.toMillis(-4 * 15), nitz.getLocalOffsetMillis()); in testParse_noDstField()
[all …]
DTestExecutorService.java35 import java.util.concurrent.TimeUnit;
89 public T get(long timeout, TimeUnit unit) in get()
99 public long getDelay(TimeUnit unit) { in getDelay()
100 if (unit == TimeUnit.MILLISECONDS) { in getDelay()
111 if (o.getDelay(TimeUnit.MILLISECONDS) > mDelayMs) return -1; in compareTo()
112 if (o.getDelay(TimeUnit.MILLISECONDS) < mDelayMs) return 1; in compareTo()
141 public boolean awaitTermination(long timeout, TimeUnit unit) { in awaitTermination()
168 TimeUnit unit) { in invokeAll()
178 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) { in invokeAny()
183 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { in schedule()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DMockScheduledExecutorService.java32 import java.util.concurrent.TimeUnit;
84 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { in schedule()
85 Preconditions.checkState(unit == TimeUnit.MILLISECONDS); in schedule()
92 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { in schedule()
98 TimeUnit unit) { in scheduleAtFixedRate()
104 long delay, TimeUnit unit) { in scheduleWithFixedDelay()
129 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { in awaitTermination()
135 MockScheduledFuture<T> future = new MockScheduledFuture<>(task, 0, TimeUnit.MILLISECONDS); in submit()
153 TimeUnit.MILLISECONDS); in submit()
166 TimeUnit unit) throws InterruptedException { in invokeAll()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DSystemUpdatePolicyTest.java55 import java.util.concurrent.TimeUnit;
281 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(2), in testInstallationOptionWithoutFreeze()
285 SystemUpdatePolicy.TYPE_INSTALL_AUTOMATIC, TimeUnit.HOURS.toMillis(1), in testInstallationOptionWithoutFreeze()
286 millis_2018_01_01 + TimeUnit.HOURS.toMillis(2), p); in testInstallationOptionWithoutFreeze()
288 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(22), in testInstallationOptionWithoutFreeze()
289 millis_2018_01_01 + TimeUnit.HOURS.toMillis(4), p); in testInstallationOptionWithoutFreeze()
293 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(1), in testInstallationOptionWithoutFreeze()
294 millis_2018_01_01 + TimeUnit.HOURS.toMillis(21), p); in testInstallationOptionWithoutFreeze()
297 SystemUpdatePolicy.TYPE_INSTALL_AUTOMATIC, TimeUnit.HOURS.toMillis(2), in testInstallationOptionWithoutFreeze()
300 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(19), in testInstallationOptionWithoutFreeze()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/
DAppTimeLimitControllerTests.java53 import java.util.concurrent.TimeUnit;
369 assertFalse(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testAppUsageObserver_Accumulation()
377 assertTrue(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testAppUsageObserver_Accumulation()
404 assertFalse(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testUsageSessionObserver_Accumulation()
412 assertTrue(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testUsageSessionObserver_Accumulation()
439 assertFalse(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testAppUsageLimitObserver_Accumulation()
447 assertTrue(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testAppUsageLimitObserver_Accumulation()
456 assertFalse(mLimitReachedLatch.await(6_000L, TimeUnit.MILLISECONDS)); in testAppUsageObserver_TimeoutOtherApp()
459 assertFalse(mLimitReachedLatch.await(100L, TimeUnit.MILLISECONDS)); in testAppUsageObserver_TimeoutOtherApp()
468 assertFalse(mLimitReachedLatch.await(6_000L, TimeUnit.MILLISECONDS)); in testUsageSessionObserver_TimeoutOtherApp()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/concurrency/
DDelayableExecutor.java20 import java.util.concurrent.TimeUnit;
34 return executeDelayed(r, delayMillis, TimeUnit.MILLISECONDS); in executeDelayed()
44 Runnable executeDelayed(Runnable r, long delay, TimeUnit unit); in executeDelayed()
54 return executeAtTime(r, uptime, TimeUnit.MILLISECONDS); in executeAtTime()
64 Runnable executeAtTime(Runnable r, long uptimeMillis, TimeUnit unit); in executeAtTime()
DRepeatableExecutorImpl.java19 import java.util.concurrent.TimeUnit;
38 public Runnable executeRepeatedly(Runnable r, long initDelay, long delay, TimeUnit unit) { in executeRepeatedly()
47 private final TimeUnit mUnit;
51 ExecutionToken(Runnable r, long delay, TimeUnit unit) { in ExecutionToken()
68 public void start(long startDelay, TimeUnit unit) { in start()
DRepeatableExecutor.java20 import java.util.concurrent.TimeUnit;
41 return executeRepeatedly(r, initialDelayMillis, delayMillis, TimeUnit.MILLISECONDS); in executeRepeatedly()
53 Runnable executeRepeatedly(Runnable r, long initialDelay, long delay, TimeUnit unit); in executeRepeatedly()
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
DPowerStatsSchedulerTest.java49 import java.util.concurrent.TimeUnit;
89 mPowerStatsAggregator, TimeUnit.MINUTES.toMillis(30), TimeUnit.HOURS.toMillis(1), in setup()
107 long delayBeforeAggregating = TimeUnit.MINUTES.toMillis(90); in storeAggregatePowerStats()
124 assertThat(endTime - startTime).isAtLeast(TimeUnit.MINUTES.toMillis(30)); in storeAggregatePowerStats()
159 START_REALTIME + TimeUnit.MINUTES.toMillis(90) + TimeUnit.HOURS.toMillis(1)); in storeAggregatePowerStats()
188 assertThat(PowerStatsScheduler.alignToWallClock(123, TimeUnit.MINUTES.toMillis(15), in alignToWallClock()
189 123 + TimeUnit.HOURS.toMillis(2), in alignToWallClock()
194 assertThat(PowerStatsScheduler.alignToWallClock(123, TimeUnit.MINUTES.toMillis(15), in alignToWallClock()
195 123 + TimeUnit.HOURS.toMillis(2), in alignToWallClock()
200 assertThat(PowerStatsScheduler.alignToWallClock(123, TimeUnit.MINUTES.toMillis(1), in alignToWallClock()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/util/io/
DFakeBasicFileAttributes.java21 import java.util.concurrent.TimeUnit;
27 private FileTime mLastModifiedTime = FileTime.from(0, TimeUnit.MILLISECONDS);
28 private FileTime mLastAccessTime = FileTime.from(0, TimeUnit.MILLISECONDS);
29 private FileTime mCreationTime = FileTime.from(0, TimeUnit.MILLISECONDS);
83 mLastModifiedTime = FileTime.from(millis, TimeUnit.MILLISECONDS); in setLastModifiedTime()
88 mLastAccessTime = FileTime.from(millis, TimeUnit.MILLISECONDS); in setLastAccessTime()
93 mCreationTime = FileTime.from(millis, TimeUnit.MILLISECONDS); in setCreationTime()
/frameworks/base/services/tests/wmtests/src/com/android/server/policy/
DKeyCombinationManagerTests.java40 import java.util.concurrent.TimeUnit;
164 assertTrue(mAction1Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testTriggerRule()
167 assertTrue(mAction2Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testTriggerRule()
170 assertTrue(mAction3Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testTriggerRule()
180 assertFalse(mAction1Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testNotTrigger_NoRule()
181 assertFalse(mAction2Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testNotTrigger_NoRule()
182 assertFalse(mAction3Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testNotTrigger_NoRule()
193 assertFalse(mAction1Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testNotTrigger_Interval()
205 assertFalse(mAction2Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testNotTrigger_Condition()
215 assertFalse(mAction3Triggered.await(SCHEDULE_TIME, TimeUnit.MILLISECONDS)); in testNotTrigger_EarlyRelease()
[all …]
DSingleKeyGestureTests.java46 import java.util.concurrent.TimeUnit;
245 assertTrue(mShortPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testShortPress()
251 assertTrue(mLongPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testLongPress()
257 assertTrue(mVeryLongPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testVeryLongPress()
266 assertTrue(mMultiPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testMultiPress()
274 assertTrue(mMultiPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testMultiPress()
286 KeyUpData keyUpData = mKeyUpQueue.poll(mWaitTimeout, TimeUnit.MILLISECONDS); in verifyKeyUpData()
297 assertFalse(mShortPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testNonInteractive()
301 assertTrue(mLongPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testNonInteractive()
321 assertTrue(mShortPressed.await(mWaitTimeout, TimeUnit.MILLISECONDS)); in testShortPress_Pressure()
[all …]
/frameworks/base/services/tests/timetests/src/com/android/server/timezonedetector/location/
DHandlerThreadingDomainTest.java36 import java.util.concurrent.TimeUnit;
85 testCode.assertCompletesWithin(60, TimeUnit.SECONDS); in assertCurrentThread()
107 testCode.assertCompletesWithin(60, TimeUnit.SECONDS); in assertNotCurrentThread()
119 testLogic.assertCompletesWithin(60, TimeUnit.SECONDS); in post()
142 executionDelay.multipliedBy(10).toMillis(), TimeUnit.MILLISECONDS); in postDelayed()
206 singleRunnableQueue.runDelayed(firstRunnable, TimeUnit.SECONDS.toMillis(10)); in singleRunnableQueue_runDelayed()
209 singleRunnableQueue.runDelayed(secondRunnable, TimeUnit.SECONDS.toMillis(10)); in singleRunnableQueue_runDelayed()
211 mTestHandler.runWithScissors(runDelayedTestRunnable, TimeUnit.SECONDS.toMillis(60)); in singleRunnableQueue_runDelayed()
214 secondRunnable.assertCompletesWithin(60, TimeUnit.SECONDS); in singleRunnableQueue_runDelayed()
218 assertTrue(afterExecutionNanos - beforeExecutionNanos >= TimeUnit.SECONDS.toNanos(10)); in singleRunnableQueue_runDelayed()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DSurfaceSyncGroupTest.java42 import java.util.concurrent.TimeUnit;
73 finishedLatch.await(5, TimeUnit.SECONDS); in testSyncOne()
99 finishedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testSyncMultiple()
137 finishedLatch1.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testMultipleSyncGroups()
143 finishedLatch2.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testMultipleSyncGroups()
169 finishedLatch2.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testAddSyncGroup()
176 finishedLatch1.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testAddSyncGroup()
179 finishedLatch2.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testAddSyncGroup()
202 finishedLatch1.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testAddSyncAlreadyComplete()
211 finishedLatch2.await(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testAddSyncAlreadyComplete()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/
DBinderProxyCountingTest.java46 import java.util.concurrent.TimeUnit;
151 if (!bindLatch.await(BIND_SERVICE_TIMEOUT_SEC, TimeUnit.SECONDS)) { in bindService()
257 if (binderLatches[1].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testBinderProxyLimitBoundary()
264 if (!binderLatches[1].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testBinderProxyLimitBoundary()
270 if (binderLatches[0].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testBinderProxyLimitBoundary()
277 if (!binderLatches[0].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testBinderProxyLimitBoundary()
308 if (!binderLatches[1].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testSetBinderProxyLimit()
314 if (!binderLatches[0].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testSetBinderProxyLimit()
347 if (!firstBinderLatches[1].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testRearmCallbackThreshold()
353 if (!firstBinderLatches[0].await(TOO_MANY_BINDERS_TIMEOUT_SEC, TimeUnit.SECONDS)) { in testRearmCallbackThreshold()
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/
DBackProgressAnimatorTest.java40 import java.util.concurrent.TimeUnit;
81 mTargetProgressCalled.await(1, TimeUnit.SECONDS); in testBackProgressed()
93 mTargetProgressCalled.await(1, TimeUnit.SECONDS); in testBackCancelled()
102 finishCallbackCalled.await(1, TimeUnit.SECONDS); in testBackCancelled()
103 mTargetProgressCalled.await(1, TimeUnit.SECONDS); in testBackCancelled()
114 mTargetProgressCalled.await(1, TimeUnit.SECONDS); in testBackInvoked()
122 finishCallbackCalled.await(1, TimeUnit.SECONDS)); in testBackInvoked()
131 mTargetProgressCalled.await(1, TimeUnit.SECONDS); in testResetCallsCancelCallbackImmediately()
161 mTargetProgressCalled.await(1, TimeUnit.SECONDS); in testCancelFinishCallbackNotInvokedWhenRemoved()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DDuration.java34 public TimeUnit timeUnit;
36 public enum TimeUnit { enum in Duration
43 TimeUnit(int value) { in TimeUnit() method in Duration.TimeUnit
56 public Duration(int timeInterval, TimeUnit timeUnit) { in Duration()
63 timeUnit = TimeUnit.values()[in.readInt()]; in Duration()
/frameworks/base/core/tests/coretests/src/android/transition/
DFadeTransitionTest.java36 import java.util.concurrent.TimeUnit;
54 assertTrue(latch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeOutAndIn()
58 assertTrue(latch.endLatch.await(800, TimeUnit.MILLISECONDS)); in testFadeOutAndIn()
64 assertTrue(latch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeOutAndIn()
70 assertTrue(latch.endLatch.await(800, TimeUnit.MILLISECONDS)); in testFadeOutAndIn()
82 assertTrue(outLatch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeOutInterrupt()
89 assertTrue(inLatch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeOutInterrupt()
97 assertTrue(inLatch.endLatch.await(800, TimeUnit.MILLISECONDS)); in testFadeOutInterrupt()
115 assertTrue(inLatch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeInInterrupt()
122 assertTrue(outLatch.startLatch.await(400, TimeUnit.MILLISECONDS)); in testFadeInInterrupt()
[all …]
/frameworks/base/core/tests/coretests/src/android/animation/
DEventsTest.java34 import java.util.concurrent.TimeUnit;
290 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testStartCancel()
311 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testStartEnd()
332 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testStartDelayedCancel()
353 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testStartDelayedEnd()
374 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testPlayingCancel()
395 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testPlayingEnd()
417 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testPlayingDelayedCancel()
439 mFuture.get(getTimeout(), TimeUnit.MILLISECONDS); in testPlayingDelayedEnd()
463 mFuture.get(getTimeout() + 100, TimeUnit.MILLISECONDS); in testPlayingDelayedCancelMidDelay()
[all …]
/frameworks/base/services/core/java/com/android/server/
DPreloadsFileCacheExpirationJobService.java33 import java.util.concurrent.TimeUnit;
53 long keepPreloadsMinTimeoutMs = DEBUG ? TimeUnit.MINUTES.toMillis(2) in schedule()
54 : TimeUnit.DAYS.toMillis(keepPreloadsMinDays); in schedule()
55 long keepPreloadsMaxTimeoutMs = DEBUG ? TimeUnit.MINUTES.toMillis(3) in schedule()
56 : TimeUnit.DAYS.toMillis(keepPreloadsMinDays + 1); in schedule()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DCachedAppOptimizerTest.java61 import java.util.concurrent.TimeUnit;
287 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in useCompaction_listensToDeviceConfigChanges()
297 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in useCompaction_listensToDeviceConfigChanges()
315 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isFalse(); in useFreeze_doesNotListenToDeviceConfigChanges()
326 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in useFreeze_doesNotListenToDeviceConfigChanges()
348 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in useCompaction_listensToDeviceConfigChangesBadValues()
399 assertThat(mCountDown.await(7, TimeUnit.SECONDS)).isTrue(); in compactThrottle_listensToDeviceConfigChanges()
426 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in compactThrottle_listensToDeviceConfigChangesBadValues()
440 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in compactThrottle_listensToDeviceConfigChangesBadValues()
453 assertThat(mCountDown.await(5, TimeUnit.SECONDS)).isTrue(); in compactThrottle_listensToDeviceConfigChangesBadValues()
[all …]
/frameworks/base/media/tests/MediaRouter/src/com/android/mediaroutertest/
DMediaRouter2ManagerTest.java80 import java.util.concurrent.TimeUnit;
211 .that(addedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testOnRoutesUpdated()
220 .that(changedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testOnRoutesUpdated()
228 .that(removedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testOnRoutesUpdated()
295 assertThat(removedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testGetRoutes_removedRoute_returnsCorrectRoutes()
302 assertThat(addedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testGetRoutes_removedRoute_returnsCorrectRoutes()
392 assertThat(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testRouterOnSessionCreated()
420 assertThat(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testGetRoutingSessions()
463 assertThat(onSessionCreatedLatch.await(WAIT_TIME_MS, TimeUnit.MILLISECONDS)).isFalse(); in testTransfer_unknownRoute_fail()
464 assertThat(onTransferFailedLatch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)).isTrue(); in testTransfer_unknownRoute_fail()
[all …]
/frameworks/base/services/core/java/com/android/server/location/contexthub/
DContextHubServiceTransaction.java23 import java.util.concurrent.TimeUnit;
141 /* package */ long getTimeout(TimeUnit unit) { in getTimeout()
144 return unit.convert(30L, TimeUnit.SECONDS); in getTimeout()
146 return unit.convert(1000L, TimeUnit.MILLISECONDS); in getTimeout()
153 return unit.convert(5L, TimeUnit.SECONDS); in getTimeout()
/frameworks/base/services/tests/servicestests/src/com/android/server/apphibernation/
DHibernationStateDiskStoreTest.java47 import java.util.concurrent.TimeUnit;
143 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { in schedule()
149 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { in schedule()
155 long period, TimeUnit unit) { in scheduleAtFixedRate()
161 long delay, TimeUnit unit) { in scheduleWithFixedDelay()
186 public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { in awaitTermination()
213 TimeUnit unit) throws InterruptedException { in invokeAll()
224 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) in invokeAny()

12345678910>>...28