/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | SystemUpdatePolicyTest.java | 264 final long millis_2018_01_01 = toMillis(2018, 1, 1); in testInstallationOptionWithoutFreeze() 276 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(2), in testInstallationOptionWithoutFreeze() 280 SystemUpdatePolicy.TYPE_INSTALL_AUTOMATIC, TimeUnit.HOURS.toMillis(1), in testInstallationOptionWithoutFreeze() 281 millis_2018_01_01 + TimeUnit.HOURS.toMillis(2), p); in testInstallationOptionWithoutFreeze() 283 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(22), in testInstallationOptionWithoutFreeze() 284 millis_2018_01_01 + TimeUnit.HOURS.toMillis(4), p); in testInstallationOptionWithoutFreeze() 288 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(1), in testInstallationOptionWithoutFreeze() 289 millis_2018_01_01 + TimeUnit.HOURS.toMillis(21), p); in testInstallationOptionWithoutFreeze() 292 SystemUpdatePolicy.TYPE_INSTALL_AUTOMATIC, TimeUnit.HOURS.toMillis(2), in testInstallationOptionWithoutFreeze() 295 assertInstallationOption(SystemUpdatePolicy.TYPE_PAUSE, TimeUnit.HOURS.toMillis(19), in testInstallationOptionWithoutFreeze() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | NitzDataTest.java | 51 assertEquals(TimeUnit.MINUTES.toMillis(-1 * 15), nitz.getLocalOffsetMillis()); in testParse_withDst() 58 assertEquals(TimeUnit.MINUTES.toMillis(8 * 15), nitz.getLocalOffsetMillis()); in testParse_withDst() 59 assertEquals(TimeUnit.HOURS.toMillis(1), nitz.getDstAdjustmentMillis().longValue()); in testParse_withDst() 65 assertEquals(TimeUnit.MINUTES.toMillis(-8 * 15), nitz.getLocalOffsetMillis()); in testParse_withDst() 66 assertEquals(TimeUnit.HOURS.toMillis(1), nitz.getDstAdjustmentMillis().longValue()); in testParse_withDst() 76 assertEquals(TimeUnit.MINUTES.toMillis(4 * 15), nitz.getLocalOffsetMillis()); in testParse_noDstField() 83 assertEquals(TimeUnit.MINUTES.toMillis(-4 * 15), nitz.getLocalOffsetMillis()); in testParse_noDstField() 93 assertEquals(TimeUnit.MINUTES.toMillis(-32 * 15), nitz.getLocalOffsetMillis()); in testParse_androidEmulatorTimeZoneExtension() 94 assertEquals(TimeUnit.HOURS.toMillis(1), nitz.getDstAdjustmentMillis().longValue()); in testParse_androidEmulatorTimeZoneExtension()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/nitz/ |
D | TimeZoneLookupHelperTest.java | 72 int lonSummerOffsetMillis = (int) TimeUnit.HOURS.toMillis(1); in testLookupByNitzByNitz() 73 int lonSummerDstOffsetMillis = (int) TimeUnit.HOURS.toMillis(1); in testLookupByNitzByNitz() 113 int mtvSummerOffsetMillis = (int) TimeUnit.HOURS.toMillis(-8); in testLookupByNitzByNitz() 114 int mtvSummerDstOffsetMillis = (int) TimeUnit.HOURS.toMillis(1); in testLookupByNitzByNitz() 117 int mtvWinterOffsetMillis = (int) TimeUnit.HOURS.toMillis(-7); in testLookupByNitzByNitz() 226 int expectedUtcOffset = (int) TimeUnit.HOURS.toMillis(2); in testLookupByNitzCountry_dstKnownAndUnknown() 227 Integer expectedDstOffset = (int) TimeUnit.HOURS.toMillis(1); in testLookupByNitzCountry_dstKnownAndUnknown() 254 int expectedUtcOffset = (int) TimeUnit.HOURS.toMillis(1); in testLookupByNitzCountry_dstKnownAndUnknown() 281 int expectedUtcOffset = (int) TimeUnit.HOURS.toMillis(2); in testLookupByNitzCountry_dstKnownAndUnknown() 298 int expectedUtcOffset = (int) TimeUnit.HOURS.toMillis(1); in testLookupByNitzCountry_dstKnownAndUnknown() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/ |
D | PowerUITest.java | 73 private static final long ONE_HOUR_MILLIS = Duration.ofHours(1).toMillis(); 75 public static final long BELOW_HYBRID_THRESHOLD = TimeUnit.HOURS.toMillis(2); 76 public static final long BELOW_SEVERE_HYBRID_THRESHOLD = TimeUnit.MINUTES.toMillis(30); 77 public static final long ABOVE_HYBRID_THRESHOLD = TimeUnit.HOURS.toMillis(4); 78 private static final long ABOVE_CHARGE_CYCLE_THRESHOLD = Duration.ofHours(8).toMillis(); 81 private static final long VERY_BELOW_SEVERE_HYBRID_THRESHOLD = TimeUnit.MINUTES.toMillis(15); 351 state.mTimeRemainingMillis = Duration.ofHours(2).toMillis(); in testMaybeShowHybridWarning() 362 state.mTimeRemainingMillis = Duration.ofMinutes(10).toMillis(); in testMaybeShowHybridWarning() 372 state.mTimeRemainingMillis = Duration.ofDays(1).toMillis(); in testMaybeShowHybridWarning() 389 state.mTimeRemainingMillis = Duration.ofHours(2).toMillis(); in testShouldShowHybridWarning_lowLevelWarning() [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | PreloadsFileCacheExpirationJobService.java | 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()
|
D | ZramWriteback.java | 130 .setMinimumLatency(TimeUnit.HOURS.toMillis(nextWbDelay)) in schedNextWriteback() 179 .setMinimumLatency(TimeUnit.MINUTES.toMillis(markIdleDelay)) in scheduleZramWriteback() 180 .setOverrideDeadline(TimeUnit.MINUTES.toMillis(markIdleDelay)) in scheduleZramWriteback() 187 .setMinimumLatency(TimeUnit.MINUTES.toMillis(firstWbDelay)) in scheduleZramWriteback()
|
D | PruneInstantAppsJobService.java | 36 ? TimeUnit.MINUTES.toMillis(1) : TimeUnit.DAYS.toMillis(1);
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/keys/ |
D | TertiaryKeyRotationWindowedCountTest.java | 74 setTimeMillis(TimeUnit.HOURS.toMillis(4)); in getCount_includesResultsInLastTwentyFourHours() 76 setTimeMillis(TimeUnit.HOURS.toMillis(23)); in getCount_includesResultsInLastTwentyFourHours() 87 setTimeMillis(TimeUnit.HOURS.toMillis(24)); in getCount_ignoresResultsOlderThanTwentyFourHours() 123 setTimeMillis(TimeUnit.HOURS.toMillis(24)); in record_compactsFileToLast24Hours()
|
D | TertiaryKeyRotationSchedulerTest.java | 118 setTimeMillis(TimeUnit.HOURS.toMillis(24)); in isKeyRotationDue_isTrueAfterAWholeWindowHasPassed() 137 setTimeMillis(i * TimeUnit.HOURS.toMillis(24)); in isKeyRotationDue_neverAllowsMoreThanInWindow() 163 setTimeMillis(i * TimeUnit.HOURS.toMillis(24)); in isKeyRotationDue_naturallyStaggersBackupsOverTime()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/ |
D | PowerUtilTest.java | 38 private static final long SEVENTEEN_MIN_MILLIS = Duration.ofMinutes(17).toMillis(); 39 private static final long FIVE_MINUTES_MILLIS = Duration.ofMinutes(5).toMillis(); 40 private static final long TEN_MINUTES_MILLIS = Duration.ofMinutes(10).toMillis(); 41 private static final long THREE_DAYS_MILLIS = Duration.ofDays(3).toMillis(); 42 private static final long THIRTY_HOURS_MILLIS = Duration.ofHours(30).toMillis();
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuThreadReaderEndToEndTest.java | 79 targetDuration.toMillis(), resultDuration.toMillis(), in testTimedWork() 99 ((double) highResultDuration.toMillis()) / ((double) lowResultDuration.toMillis()), in testIterativeWork() 164 final long durationMillis = duration.toMillis(); in timedWork()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/people/prediction/ |
D | SharesheetModelScorerTest.java | 63 NOW - Duration.ofHours(23).toMillis(), 64 NOW - Duration.ofHours(22).toMillis()); 66 NOW - Duration.ofHours(50).toMillis(), 67 NOW - Duration.ofHours(49).toMillis()); 69 NOW - Duration.ofDays(6).toMillis(), 70 NOW - Duration.ofDays(5).toMillis()); 72 NOW - Duration.ofDays(9).toMillis(), 73 NOW - Duration.ofDays(8).toMillis()); 75 NOW - Duration.ofDays(13).toMillis(), 76 NOW - Duration.ofDays(12).toMillis()); [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/ |
D | PowerUtil.java | 39 private static final long SEVEN_MINUTES_MILLIS = TimeUnit.MINUTES.toMillis(7); 40 private static final long FIFTEEN_MINUTES_MILLIS = TimeUnit.MINUTES.toMillis(15); 41 private static final long ONE_DAY_MILLIS = TimeUnit.DAYS.toMillis(1); 42 private static final long TWO_DAYS_MILLIS = TimeUnit.DAYS.toMillis(2); 43 private static final long ONE_HOUR_MILLIS = TimeUnit.HOURS.toMillis(1);
|
/frameworks/layoutlib/create/src/com/android/tools/layoutlib/java/ |
D | System_Delegate.java | 58 return TimeUnit.NANOSECONDS.toMillis(mNanosTime.get()); in currentTimeMillis() 66 return TimeUnit.NANOSECONDS.toMillis(mBootNanosTime.get()); in bootTimeMillis()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/dump/ |
D | LogBufferEulogizer.kt | 143 return systemClock.currentTimeMillis() - (stats?.lastModifiedTime()?.toMillis() ?: 0) in <lambda>() 148 private val MIN_WRITE_GAP = TimeUnit.MINUTES.toMillis(5) 149 private val MAX_AGE_TO_DUMP = TimeUnit.HOURS.toMillis(48)
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/concurrency/ |
D | ExecutorImpl.java | 47 mHandler.sendMessageDelayed(m, unit.toMillis(delay)); in executeDelayed() 56 mHandler.sendMessageAtTime(m, unit.toMillis(uptimeMillis)); in executeAtTime()
|
/frameworks/base/core/java/android/text/format/ |
D | Time.java | 231 long timeInMillis = calculator.toMillis(ignoreDst); in normalize() 750 public long toMillis(boolean ignoreDst) { in toMillis() method in Time 752 return calculator.toMillis(ignoreDst); in toMillis() 954 long millis = time.toMillis(true); in isEpoch() 1085 public long toMillis(boolean ignoreDst) { in toMillis() method in Time.TimeCalculator 1212 toMillis(false /* use isDst */) / 1000 in toStringInternal() 1255 long am = aObject.toMillis(false /* use isDst */); in compare() 1256 long bm = bObject.toMillis(false /* use isDst */); in compare()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | SelfRecoveryTest.java | 68 .thenReturn(TimeUnit.HOURS.toMillis(1) + 1); in testValidTriggerReasonsSendMessageToWifiController() 136 .thenReturn(TimeUnit.HOURS.toMillis(1) + 1); in testTimeWindowLimiting_typicalUse() 142 .thenReturn(TimeUnit.HOURS.toMillis(1) + 1); in testTimeWindowLimiting_typicalUse()
|
/frameworks/base/apex/blobstore/service/java/com/android/server/blob/ |
D | BlobStoreConfig.java | 71 public static final long DEFAULT_IDLE_JOB_PERIOD_MS = TimeUnit.DAYS.toMillis(1); 79 public static final long DEFAULT_SESSION_EXPIRY_TIMEOUT_MS = TimeUnit.DAYS.toMillis(7); 110 TimeUnit.HOURS.toMillis(6); 122 TimeUnit.HOURS.toMillis(48); 141 TimeUnit.HOURS.toMillis(6);
|
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/ |
D | SecurityLogMonitor.java | 87 private static final long RATE_LIMIT_INTERVAL_MS = TimeUnit.HOURS.toMillis(2); 91 private static final long BROADCAST_RETRY_INTERVAL_MS = TimeUnit.MINUTES.toMillis(30); 95 private static final long POLLING_INTERVAL_MS = TimeUnit.MINUTES.toMillis(1); 177 mMonitorThread.join(TimeUnit.SECONDS.toMillis(5)); in stop() 509 return NANOSECONDS.toMillis(toWaitNanos) + 1; // Round up. in forceLogs()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/display/ |
D | BrightnessTrackerTest.java | 288 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(2)); in testBrightnessEvent() 298 assertEquals(mInjector.currentTimeMillis() - TimeUnit.SECONDS.toMillis(2), in testBrightnessEvent() 352 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(1)); in testIgnoreAutomaticBrightnessChange() 410 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(1)); in testLimitedSensorEvents() 425 mInjector.currentTimeMillis() - i * TimeUnit.SECONDS.toMillis(1)); in testLimitedSensorEvents() 435 long someTimeAgo = System.currentTimeMillis() - TimeUnit.HOURS.toMillis(12); in testReadEvents() 436 long twoMonthsAgo = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(60); in testReadEvents() 528 Long.toString(System.currentTimeMillis() - TimeUnit.HOURS.toMillis(12)); in testFailedRead() 569 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(2)); in testWriteThenRead() 572 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(3)); in testWriteThenRead() [all …]
|
/frameworks/base/tests/GamePerformance/src/android/gameperformance/ |
D | BaseTest.java | 33 private final static long WARM_UP_TIME = TimeUnit.SECONDS.toMillis(5); 38 private final static long TEST_ITERATION_TIME = TimeUnit.SECONDS.toMillis(12);
|
/frameworks/base/core/java/android/app/admin/ |
D | SystemUpdatePolicy.java | 639 long whenMillis = TimeUnit.HOURS.toMillis(query.get(Calendar.HOUR_OF_DAY)) in getInstallationOptionRegardlessFreezeAt() 640 + TimeUnit.MINUTES.toMillis(query.get(Calendar.MINUTE)) in getInstallationOptionRegardlessFreezeAt() 641 + TimeUnit.SECONDS.toMillis(query.get(Calendar.SECOND)) in getInstallationOptionRegardlessFreezeAt() 643 long windowStartMillis = TimeUnit.MINUTES.toMillis(mMaintenanceWindowStart); in getInstallationOptionRegardlessFreezeAt() 644 long windowEndMillis = TimeUnit.MINUTES.toMillis(mMaintenanceWindowEnd); in getInstallationOptionRegardlessFreezeAt() 645 final long dayInMillis = TimeUnit.DAYS.toMillis(1); in getInstallationOptionRegardlessFreezeAt()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/concurrency/ |
D | FakeExecutor.java | 146 return executeAtTime(r, mClock.uptimeMillis() + unit.toMillis(delay)); in executeDelayed() 151 long uptimeMillis = unit.toMillis(uptime); in executeAtTime()
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | UsageStatsIdleService.java | 69 .setMinimumLatency(TimeUnit.DAYS.toMillis(1)) in scheduleUpdateMappingsJob() 70 .setOverrideDeadline(TimeUnit.DAYS.toMillis(2)) in scheduleUpdateMappingsJob()
|