Home
last modified time | relevance | path

Searched refs:MINUTE_IN_MILLIS (Results 1 – 25 of 61) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/text/format/
DRelativeDateTimeFormatterTest.java26 import static android.text.format.RelativeDateTimeFormatter.MINUTE_IN_MILLIS;
66 MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
69 MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
72 getRelativeTimeSpanString(en_US, tz, 0, MINUTE_IN_MILLIS, MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
74 getRelativeTimeSpanString(en_US, tz, MINUTE_IN_MILLIS, 0, MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
77 getRelativeTimeSpanString(en_US, tz, baseTime - 42 * MINUTE_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS()
78 MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
80 getRelativeTimeSpanString(en_US, tz, baseTime + 42 * MINUTE_IN_MILLIS, baseTime, in test_getRelativeTimeSpanStringCTS()
81 MINUTE_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS()
86 MINUTE_IN_MILLIS, FORMAT_NUMERIC_DATE)); in test_getRelativeTimeSpanStringCTS()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/
DQuotaControllerTest.java126 private static final long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS; field in QuotaControllerTest
127 private static final long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
481 now - 10 * MINUTE_IN_MILLIS, 9 * MINUTE_IN_MILLIS, 3); in testDeleteObsoleteSessionsLocked()
483 now - (70 * MINUTE_IN_MILLIS), 9 * MINUTE_IN_MILLIS, 1); in testDeleteObsoleteSessionsLocked()
486 now - (3 * HOUR_IN_MILLIS + 10 * MINUTE_IN_MILLIS), 9 * MINUTE_IN_MILLIS, 1); in testDeleteObsoleteSessionsLocked()
489 now - (24 * HOUR_IN_MILLIS + 2 * MINUTE_IN_MILLIS), 7 * MINUTE_IN_MILLIS, 1); in testDeleteObsoleteSessionsLocked()
491 QuotaBump bump2 = new QuotaBump(now - 24 * HOUR_IN_MILLIS - 5 * MINUTE_IN_MILLIS); in testDeleteObsoleteSessionsLocked()
493 now - (25 * HOUR_IN_MILLIS), 5 * MINUTE_IN_MILLIS, 4); in testDeleteObsoleteSessionsLocked()
527 createTimingSession(now - (6 * HOUR_IN_MILLIS), 10 * MINUTE_IN_MILLIS, 5), false); in testOnAppRemovedLocked()
530 now - (2 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 6 * MINUTE_IN_MILLIS, 5), in testOnAppRemovedLocked()
[all …]
DTimeControllerTest.java70 private static final long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS; field in TimeControllerTest
71 private static final long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
176 createJob().setMinimumLatency(30 * MINUTE_IN_MILLIS)); in runTestMaybeStartTrackingJobLocked_DelayInOrder()
178 createJob().setMinimumLatency(5 * MINUTE_IN_MILLIS)); in runTestMaybeStartTrackingJobLocked_DelayInOrder()
184 .set(anyInt(), eq(now + 5 * MINUTE_IN_MILLIS), anyLong(), anyLong(), eq(TAG_DELAY), in runTestMaybeStartTrackingJobLocked_DelayInOrder()
201 createJob().setMinimumLatency(30 * MINUTE_IN_MILLIS)); in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
203 createJob().setMinimumLatency(5 * MINUTE_IN_MILLIS)); in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
216 .set(anyInt(), eq(now + 5 * MINUTE_IN_MILLIS), anyLong(), anyLong(), eq(TAG_DELAY), in testMaybeStartTrackingJobLocked_DelayInOrder_SomeNotReady()
239 createJob().setMinimumLatency(30 * MINUTE_IN_MILLIS)); in runTestMaybeStartTrackingJobLocked_DelayReverseOrder()
241 createJob().setMinimumLatency(5 * MINUTE_IN_MILLIS)); in runTestMaybeStartTrackingJobLocked_DelayReverseOrder()
[all …]
DPrefetchControllerTest.java20 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
246 setDeviceConfigLong(PcConstants.KEY_LAUNCH_TIME_ALLOWANCE_MS, 5 * MINUTE_IN_MILLIS); in testConstantsUpdating_ValidValues()
249 assertEquals(5 * MINUTE_IN_MILLIS, mPrefetchController.getLaunchTimeAllowanceMs()); in testConstantsUpdating_ValidValues()
255 setDeviceConfigLong(PcConstants.KEY_LAUNCH_TIME_THRESHOLD_MS, 4 * MINUTE_IN_MILLIS); in testConstantsUpdating_InvalidValues()
256 setDeviceConfigLong(PcConstants.KEY_LAUNCH_TIME_ALLOWANCE_MS, -MINUTE_IN_MILLIS); in testConstantsUpdating_InvalidValues()
317 .thenReturn(sSystemClock.millis() + MINUTE_IN_MILLIS); in testConstraintSatisfiedWhenLaunchSoon()
339 .thenReturn(sSystemClock.millis() + 10 * MINUTE_IN_MILLIS); in testConstraintSatisfiedWhenTop()
446 SOURCE_PACKAGE, sSystemClock.millis() + MINUTE_IN_MILLIS); in testEstimatedLaunchTimeChangedToSoon()
458 setDeviceConfigLong(PcConstants.KEY_LAUNCH_TIME_ALLOWANCE_MS, 15 * MINUTE_IN_MILLIS); in testEstimatedLaunchTimeAllowance()
486 sSystemClock = getShiftedClock(sSystemClock, HOUR_IN_MILLIS + MINUTE_IN_MILLIS); in testEstimatedLaunchTimeAllowance()
DFlexibilityControllerTest.java26 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
631 long deadline = 100 * MINUTE_IN_MILLIS; in testCurPercent()
658 deadline = HOUR_IN_MILLIS + 100 * MINUTE_IN_MILLIS; in testCurPercent()
690 .setPeriodic(HOUR_IN_MILLIS, 20 * MINUTE_IN_MILLIS); in testGetLifeCycleBeginningElapsedLocked_Periodic()
700 assertEquals(nowElapsed + 40 * MINUTE_IN_MILLIS, in testGetLifeCycleBeginningElapsedLocked_Periodic()
704 final long adjustmentMs = 4 * MINUTE_IN_MILLIS; in testGetLifeCycleBeginningElapsedLocked_Periodic()
714 nowElapsed + 2 * HOUR_IN_MILLIS - 20 * MINUTE_IN_MILLIS + adjustmentMs, in testGetLifeCycleBeginningElapsedLocked_Periodic()
722 assertEquals(nowElapsed + 2 * HOUR_IN_MILLIS - 20 * MINUTE_IN_MILLIS + adjustmentMs / 2, in testGetLifeCycleBeginningElapsedLocked_Periodic()
727 nowElapsed + 30 * MINUTE_IN_MILLIS, in testGetLifeCycleBeginningElapsedLocked_Periodic()
733 nowElapsed + 30 * MINUTE_IN_MILLIS, in testGetLifeCycleBeginningElapsedLocked_Periodic()
[all …]
DStateControllerTest.java59 private static final long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS; field in StateControllerTest
60 private static final long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/controllers/idle/
DDeviceIdlenessTrackerTest.java20 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
106 doReturn((int) (31 * MINUTE_IN_MILLIS)).when(mResources).getInteger( in setUp()
108 doReturn((int) (17 * MINUTE_IN_MILLIS)).when(mResources).getInteger( in setUp()
167 setDeviceConfigLong(KEY_INACTIVITY_IDLE_THRESHOLD_MS, MINUTE_IN_MILLIS); in testAlarmSkippedIfAlreadyIdle()
168 setDeviceConfigLong(KEY_INACTIVITY_STABLE_POWER_IDLE_THRESHOLD_MS, 5 * MINUTE_IN_MILLIS); in testAlarmSkippedIfAlreadyIdle()
175 long expectedAlarmElapsed = nowElapsed + MINUTE_IN_MILLIS; in testAlarmSkippedIfAlreadyIdle()
188 advanceElapsedClock(MINUTE_IN_MILLIS); in testAlarmSkippedIfAlreadyIdle()
205 setDeviceConfigLong(KEY_INACTIVITY_IDLE_THRESHOLD_MS, 10 * MINUTE_IN_MILLIS); in testAlarmSkippedIfNoThresholdChange()
206 setDeviceConfigLong(KEY_INACTIVITY_STABLE_POWER_IDLE_THRESHOLD_MS, 10 * MINUTE_IN_MILLIS); in testAlarmSkippedIfNoThresholdChange()
213 long expectedAlarmElapsed = nowElapsed + 10 * MINUTE_IN_MILLIS; in testAlarmSkippedIfNoThresholdChange()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/
DAlarmQueueTest.java20 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
191 alarmQueue.addAlarm("1", nowElapsed + 5 * MINUTE_IN_MILLIS);
193 anyInt(), eq(nowElapsed + 5 * MINUTE_IN_MILLIS), eq(ALARM_TAG), any(), any());
196 alarmQueue.addAlarm("1", nowElapsed + 20 * MINUTE_IN_MILLIS);
198 anyInt(), eq(nowElapsed + 20 * MINUTE_IN_MILLIS), eq(ALARM_TAG), any(), any());
200 alarmQueue.addAlarm("1", nowElapsed + 10 * MINUTE_IN_MILLIS);
202 anyInt(), eq(nowElapsed + 10 * MINUTE_IN_MILLIS), eq(ALARM_TAG), any(), any());
206 alarmQueue.addAlarm("2", nowElapsed + 11 * MINUTE_IN_MILLIS);
210 alarmQueue.addAlarm("2", nowElapsed + 51 * MINUTE_IN_MILLIS);
214 alarmQueue.addAlarm("1", nowElapsed + 52 * MINUTE_IN_MILLIS);
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
DCountQuotaTrackerTest.java75 private static final long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS; field in CountQuotaTrackerTest
76 private static final long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS;
258 now - (2 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS)); in testAppRemoval()
262 expected1.addLast(now - 10 * MINUTE_IN_MILLIS); in testAppRemoval()
264 expected2.addLast(now - 70 * MINUTE_IN_MILLIS); in testAppRemoval()
265 logEventAt(TEST_USER_ID, "com.android.test.stay", "tag1", now - 10 * MINUTE_IN_MILLIS); in testAppRemoval()
266 logEventAt(TEST_USER_ID, "com.android.test.stay", "tag2", now - 70 * MINUTE_IN_MILLIS); in testAppRemoval()
289 now - (2 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS)); in testUserRemoval()
293 expected.addLast(now - (70 * MINUTE_IN_MILLIS)); in testUserRemoval()
294 expected.addLast(now - (10 * MINUTE_IN_MILLIS)); in testUserRemoval()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
DStringUtilTest.java46 final double testMillis = 5 * DateUtils.MINUTE_IN_MILLIS + 30 * DateUtils.SECOND_IN_MILLIS; in testFormatElapsedTime_WithSeconds_ShowSeconds()
55 final double testMillis = 5 * DateUtils.MINUTE_IN_MILLIS + 30 * DateUtils.SECOND_IN_MILLIS; in testFormatElapsedTime_NoSeconds_DoNotShowSeconds()
65 + 4 * DateUtils.HOUR_IN_MILLIS + 15 * DateUtils.MINUTE_IN_MILLIS; in testFormatElapsedTime_TimeMoreThanOneDay_ShowCorrectly()
75 + 4 * DateUtils.HOUR_IN_MILLIS + 15 * DateUtils.MINUTE_IN_MILLIS; in testFormatElapsedTime_TimeMoreThanOneDayAndCollapseTimeUnit_ShowCorrectly()
84 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS + 15 * DateUtils.MINUTE_IN_MILLIS; in testFormatElapsedTime_ZeroFieldsInTheMiddleDontShow()
111 final double testMillis = 15 * DateUtils.MINUTE_IN_MILLIS; in testFormatElapsedTime_onlyContainsMinute_hasTtsSpan()
163 final double testMillis = 2 * DateUtils.MINUTE_IN_MILLIS; in testFormatRelativeTime_TwoMinutes_withSeconds()
172 final double testMillis = 119 * DateUtils.MINUTE_IN_MILLIS; in testFormatRelativeTime_LessThanTwoHours_withSeconds()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/
DJobSchedulerServiceTest.java21 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
307 mService.mConstants.RUNTIME_MIN_GUARANTEE_MS = 10 * MINUTE_IN_MILLIS; in testGetMinJobExecutionGuaranteeMs()
988 final long initialBackoffMs = MINUTE_IN_MILLIS; in testGetRescheduleJobForFailure_timingCalculations()
1134 createJobInfo().setPeriodic(15 * MINUTE_IN_MILLIS)); in testGetRescheduleJobForPeriodic_minPeriod()
1135 final long nextWindowStartTime = now + 15 * MINUTE_IN_MILLIS; in testGetRescheduleJobForPeriodic_minPeriod()
1136 final long nextWindowEndTime = now + 30 * MINUTE_IN_MILLIS; in testGetRescheduleJobForPeriodic_minPeriod()
1192 advanceElapsedClock(10 * MINUTE_IN_MILLIS); // now + 10 minutes in testGetRescheduleJobForPeriodic_insideWindow()
1198 advanceElapsedClock(20 * MINUTE_IN_MILLIS); // now + 30 minutes in testGetRescheduleJobForPeriodic_insideWindow()
1204 advanceElapsedClock(25 * MINUTE_IN_MILLIS); // now + 55 minutes in testGetRescheduleJobForPeriodic_insideWindow()
1208 assertEquals(nextWindowStartTime + 5 * MINUTE_IN_MILLIS, in testGetRescheduleJobForPeriodic_insideWindow()
[all …]
/frameworks/base/core/tests/utiltests/src/android/util/
DTimeUtilsTest.java40 public static final long MINUTE_IN_MILLIS = SECOND_IN_MILLIS * 60; field in TimeUtilsTest
41 public static final long HOUR_IN_MILLIS = MINUTE_IN_MILLIS * 60;
77 accum += 59 * MINUTE_IN_MILLIS; in testFormatDuration()
/frameworks/base/services/core/java/com/android/server/power/stats/
DPowerStatsScheduler.java39 private static final long MINUTE_IN_MILLIS = TimeUnit.MINUTES.toMillis(1); field in PowerStatsScheduler
185 if (interval >= MINUTE_IN_MILLIS && TimeUnit.HOURS.toMillis(1) % interval == 0) { in alignToWallClock()
190 cal.setTimeInMillis(targetWallClockTime + MINUTE_IN_MILLIS - 1); in alignToWallClock()
195 int intervalInMinutes = (int) (interval / MINUTE_IN_MILLIS); in alignToWallClock()
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DConversationStoreTest.java198 3L * DateUtils.MINUTE_IN_MILLIS); in testDataPersistenceAndRestoration()
205 mMockScheduledExecutorService.fastForwardTime(3L * DateUtils.MINUTE_IN_MILLIS); in testDataPersistenceAndRestoration()
229 mMockScheduledExecutorService.fastForwardTime(3L * DateUtils.MINUTE_IN_MILLIS); in testDelayedDiskWrites()
235 mMockScheduledExecutorService.fastForwardTime(DateUtils.MINUTE_IN_MILLIS); in testDelayedDiskWrites()
244 mMockScheduledExecutorService.fastForwardTime(3L * DateUtils.MINUTE_IN_MILLIS); in testDelayedDiskWrites()
248 mMockScheduledExecutorService.fastForwardTime(3L * DateUtils.MINUTE_IN_MILLIS); in testDelayedDiskWrites()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/idle/
DDeviceIdlenessTracker.java21 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
155 mInactivityIdleThreshold = Math.max(MINUTE_IN_MILLIS, Math.min(4 * HOUR_IN_MILLIS, in processConstant()
162 mInactivityStablePowerIdleThreshold = Math.max(MINUTE_IN_MILLIS, in processConstant()
170 mIdleWindowSlop = Math.max(MINUTE_IN_MILLIS, Math.min(15 * MINUTE_IN_MILLIS, in processConstant()
/frameworks/base/core/java/android/widget/
DDateTimeView.java21 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
261 if (duration < MINUTE_IN_MILLIS) {
263 mUpdateTimeMillis = mTimeMillis + MINUTE_IN_MILLIS + 1;
266 count = (int)(duration / MINUTE_IN_MILLIS);
271 millisIncrease = MINUTE_IN_MILLIS;
379 if (duration < MINUTE_IN_MILLIS) { in onInitializeAccessibilityNodeInfoInternal()
382 count = (int)(duration / MINUTE_IN_MILLIS); in onInitializeAccessibilityNodeInfoInternal()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DFileRotatorTest.java21 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
132 currentTime += MINUTE_IN_MILLIS; in testRotate()
153 mBasePath, PREFIX, MINUTE_IN_MILLIS, DAY_IN_MILLIS); in testDelete()
161 currentTime += MINUTE_IN_MILLIS + SECOND_IN_MILLIS; in testDelete()
171 currentTime = TEST_TIME + DAY_IN_MILLIS + (2 * MINUTE_IN_MILLIS); in testDelete()
184 mBasePath, PREFIX, MINUTE_IN_MILLIS, DAY_IN_MILLIS); in testThrowRestoresBackup()
/frameworks/base/core/java/android/text/format/
DRelativeDateTimeFormatter.java48 public static final long MINUTE_IN_MILLIS = SECOND_IN_MILLIS * 60; field in RelativeDateTimeFormatter
49 public static final long HOUR_IN_MILLIS = MINUTE_IN_MILLIS * 60;
148 if (duration < MINUTE_IN_MILLIS && minResolution < MINUTE_IN_MILLIS) { in getRelativeTimeSpanString()
152 count = (int) (duration / MINUTE_IN_MILLIS); in getRelativeTimeSpanString()
DDateUtils.java55 public static final long MINUTE_IN_MILLIS = SECOND_IN_MILLIS * 60; field in DateUtils
56 public static final long HOUR_IN_MILLIS = MINUTE_IN_MILLIS * 60;
279 return getRelativeTimeSpanString(startTime, System.currentTimeMillis(), MINUTE_IN_MILLIS); in getRelativeTimeSpanString()
421 } else if (millis >= MINUTE_IN_MILLIS) { in formatDuration()
422 final int minutes = (int) ((millis + 30000) / MINUTE_IN_MILLIS); in formatDuration()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/
DQuotaController.java20 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
407 private static final long MAX_PERIOD_MS = 24 * 60 * MINUTE_IN_MILLIS;
1625 if (nextCleanupElapsed - mNextCleanupTimeElapsed <= 10 * MINUTE_IN_MILLIS) { in maybeScheduleCleanupAlarmLocked()
1628 nextCleanupElapsed = mNextCleanupTimeElapsed + 10 * MINUTE_IN_MILLIS; in maybeScheduleCleanupAlarmLocked()
1927 inQuotaTimeElapsed = nowElapsed + 5 * MINUTE_IN_MILLIS; in maybeScheduleStartAlarmLocked()
3231 MINUTE_IN_MILLIS;
3256 private static final long DEFAULT_MIN_QUOTA_CHECK_DELAY_MS = MINUTE_IN_MILLIS;
3258 private static final long DEFAULT_EJ_LIMIT_EXEMPTED_MS = 60 * MINUTE_IN_MILLIS;
3259 private static final long DEFAULT_EJ_LIMIT_ACTIVE_MS = 30 * MINUTE_IN_MILLIS;
3261 private static final long DEFAULT_EJ_LIMIT_FREQUENT_MS = 10 * MINUTE_IN_MILLIS;
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DDropboxRateLimiter.java34 private static final long RATE_LIMIT_BUFFER_DURATION_DEFAULT = 10 * DateUtils.MINUTE_IN_MILLIS;
45 20 * DateUtils.MINUTE_IN_MILLIS;
/frameworks/base/services/core/java/com/android/server/notification/
DCountdownConditionProvider.java124 DateUtils.getRelativeTimeSpanString(mTime, now, DateUtils.MINUTE_IN_MILLIS); in onSubscribe()
179 DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS); in tryParseDescription()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DLocaleTracker.java19 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
114 private static final long CELL_INFO_MAX_DELAY_MS = 10 * MINUTE_IN_MILLIS;
118 private static final long CELL_INFO_PERIODIC_POLLING_DELAY_MS = 10 * MINUTE_IN_MILLIS;
125 private static final long SERVICE_OPERATOR_LOST_DELAY_MS = 10 * MINUTE_IN_MILLIS;
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DRemoteLockscreenValidationSessionStorage.java39 private static final long SESSION_TIMEOUT_MILLIS = 10L * DateUtils.MINUTE_IN_MILLIS;
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneInfo.java130 final long nowMinute = System.currentTimeMillis() / DateUtils.MINUTE_IN_MILLIS; in getGmtDisplayName()
131 final long now = nowMinute * DateUtils.MINUTE_IN_MILLIS; in getGmtDisplayName()

123