/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 | 66 private static final long ONE_HOUR_MILLIS = Duration.ofHours(1).toMillis(); 68 public static final long BELOW_HYBRID_THRESHOLD = TimeUnit.HOURS.toMillis(2); 69 public static final long BELOW_SEVERE_HYBRID_THRESHOLD = TimeUnit.MINUTES.toMillis(30); 70 public static final long ABOVE_HYBRID_THRESHOLD = TimeUnit.HOURS.toMillis(4); 71 private static final long ABOVE_CHARGE_CYCLE_THRESHOLD = Duration.ofHours(8).toMillis(); 74 private static final long VERY_BELOW_SEVERE_HYBRID_THRESHOLD = TimeUnit.MINUTES.toMillis(15); 330 state.mTimeRemainingMillis = Duration.ofHours(2).toMillis(); in testMaybeShowHybridWarning() 341 state.mTimeRemainingMillis = Duration.ofMinutes(10).toMillis(); in testMaybeShowHybridWarning() 351 state.mTimeRemainingMillis = Duration.ofDays(1).toMillis(); in testMaybeShowHybridWarning() 368 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/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/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/services/tests/servicestests/src/com/android/server/display/ |
D | BrightnessTrackerTest.java | 259 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(2)); in testBrightnessEvent() 269 assertEquals(mInjector.currentTimeMillis() - TimeUnit.SECONDS.toMillis(2), in testBrightnessEvent() 326 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(1)); in testIgnoreAutomaticBrightnessChange() 384 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(1)); in testLimitedSensorEvents() 399 mInjector.currentTimeMillis() - i * TimeUnit.SECONDS.toMillis(1)); in testLimitedSensorEvents() 409 long someTimeAgo = System.currentTimeMillis() - TimeUnit.HOURS.toMillis(12); in testReadEvents() 410 long twoMonthsAgo = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(60); in testReadEvents() 502 Long.toString(System.currentTimeMillis() - TimeUnit.HOURS.toMillis(12)); in testFailedRead() 543 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(2)); in testWriteThenRead() 546 mInjector.incrementTime(TimeUnit.SECONDS.toMillis(3)); in testWriteThenRead() [all …]
|
/frameworks/base/core/java/android/text/format/ |
D | Time.java | 230 long timeInMillis = calculator.toMillis(ignoreDst); in normalize() 749 public long toMillis(boolean ignoreDst) { in toMillis() method in Time 751 return calculator.toMillis(ignoreDst); in toMillis() 950 long millis = time.toMillis(true); in isEpoch() 1073 public long toMillis(boolean ignoreDst) { in toMillis() method in Time.TimeCalculator 1195 toMillis(false /* use isDst */) / 1000 in toStringInternal() 1238 long am = aObject.toMillis(false /* use isDst */); in compare() 1239 long bm = bObject.toMillis(false /* use isDst */); in compare()
|
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/ |
D | SecurityLogMonitor.java | 85 private static final long RATE_LIMIT_INTERVAL_MS = TimeUnit.HOURS.toMillis(2); 89 private static final long BROADCAST_RETRY_INTERVAL_MS = TimeUnit.MINUTES.toMillis(30); 93 private static final long POLLING_INTERVAL_MS = TimeUnit.MINUTES.toMillis(1); 168 mMonitorThread.join(TimeUnit.SECONDS.toMillis(5)); in stop() 500 return NANOSECONDS.toMillis(toWaitNanos) + 1; // Round up. in forceLogs()
|
/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/opt/calendar/tests/src/com/android/calendarcommon2/ |
D | RecurrenceProcessorTest.java | 109 long[] out = rp.expand(dtstart, recur, rangeStart.toMillis(false /* use isDst */), in verifyRecurrence() 110 rangeEnd.toMillis(false /* use isDst */)); in verifyRecurrence() 153 lastMillis = outCal.toMillis(true /* ignore isDst */); in verifyRecurrence() 158 expectedMillis = expectedLast.toMillis(true /* ignore isDst */); in verifyRecurrence() 2463 long rangeStartMillis = rangeStart.toMillis(false /* use isDst */); in performanceTextExpand() 2464 long rangeEndMillis = rangeEnd.toMillis(false /* use isDst */); in performanceTextExpand()
|
/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | TimeTest.java | 216 long millis = local.toMillis(true /* ignore isDst */); in testNormalize1() 261 long millis = local.toMillis(false /* use isDst */); in testNormalize1() 345 long r = t.toMillis(true /* ignore isDst */); in testMillis0() 348 r = t.toMillis(true /* ignore isDst */); in testMillis0() 356 long r = t.toMillis(true /* ignore isDst */); in testMillis1() 606 millis = time.toMillis(false); in disableTestSetJulianDay()
|
/frameworks/base/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/ |
D | StagedRollbackTest.java | 115 assertTrue(getDevice().waitForDeviceNotAvailable(TimeUnit.MINUTES.toMillis(5))); in testNativeWatchdogTriggersRollback() 151 assertTrue(getDevice().waitForDeviceNotAvailable(TimeUnit.MINUTES.toMillis(5))); in testNetworkFailedRollback()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/location/ |
D | RecentLocationAccessesTest.java | 41 private static final long ONE_MIN_AGO = NOW - TimeUnit.MINUTES.toMillis(1); 42 private static final long TWENTY_THREE_HOURS_AGO = NOW - TimeUnit.HOURS.toMillis(23); 43 private static final long TWO_DAYS_AGO = NOW - TimeUnit.DAYS.toMillis(2);
|
D | RecentLocationAppsTest.java | 40 private static final long ONE_MIN_AGO = NOW - TimeUnit.MINUTES.toMillis(1); 41 private static final long TWENTY_THREE_HOURS_AGO = NOW - TimeUnit.HOURS.toMillis(23); 42 private static final long TWO_DAYS_AGO = NOW - TimeUnit.DAYS.toMillis(2);
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | BurnInProtectionHelper.java | 47 TimeUnit.MINUTES.toMillis(1); 49 TimeUnit.MINUTES.toMillis(2); 50 private static final long BURNIN_PROTECTION_MINIMAL_INTERVAL_MS = TimeUnit.SECONDS.toMillis(10);
|
/frameworks/base/core/java/android/app/usage/ |
D | UsageStatsManager.java | 651 timeUnit.toMillis(timeLimit), callbackIntent, mContext.getOpPackageName()); in registerAppUsageObserver() 722 timeLimit.toMillis(), sessionThresholdTime.toMillis(), in registerUsageSessionObserver() 801 timeLimit.toMillis(), timeUsed.toMillis(), callbackIntent, in registerAppUsageLimitObserver()
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | GpsPsdsDownloader.java | 45 private static final int CONNECTION_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(30); 46 private static final int READ_TIMEOUT_MS = (int) TimeUnit.SECONDS.toMillis(60);
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | BackgroundDexOptService.java | 67 ? TimeUnit.MINUTES.toMillis(1) 68 : TimeUnit.DAYS.toMillis(1); 119 .setMinimumLatency(TimeUnit.MINUTES.toMillis(1)) in schedule() 120 .setOverrideDeadline(TimeUnit.MINUTES.toMillis(1)) in schedule() 652 return TimeUnit.DAYS.toMillis(Long.parseLong(sysPropValue)); in getDowngradeUnusedAppsThresholdInMillis()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/ |
D | NetworkCycleChartData.java | 26 public static final long BUCKET_DURATION_MS = TimeUnit.DAYS.toMillis(1);
|