/frameworks/base/core/tests/coretests/src/android/text/format/ |
D | RelativeDateTimeFormatterTest.java | 24 import static android.text.format.RelativeDateTimeFormatter.DAY_IN_MILLIS; 96 getRelativeTimeSpanString(en_US, tz, DAY_IN_MILLIS, 0, DAY_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 98 getRelativeTimeSpanString(en_US, tz, 2 * DAY_IN_MILLIS, 0, DAY_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 100 getRelativeTimeSpanString(en_US, tz, 0, DAY_IN_MILLIS, DAY_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 102 getRelativeTimeSpanString(en_US, tz, 0, 2 * DAY_IN_MILLIS, DAY_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 107 DAY_IN_MILLIS, 0)); in test_getRelativeTimeSpanStringCTS() 142 test_getRelativeTimeSpanString_helper(5 * DAY_IN_MILLIS, 0, "5 days ago", "In 5 days"); in test_getRelativeTimeSpanString() 192 test_getRelativeTimeSpanString_helper(0 * DAY_IN_MILLIS, DAY_IN_MILLIS, "Today", "Today"); in test_getRelativeTimeSpanString() 193 test_getRelativeTimeSpanString_helper(20 * HOUR_IN_MILLIS, DAY_IN_MILLIS, "Yesterday", in test_getRelativeTimeSpanString() 195 test_getRelativeTimeSpanString_helper(24 * HOUR_IN_MILLIS, DAY_IN_MILLIS, "Yesterday", in test_getRelativeTimeSpanString() [all …]
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | UnixCalendar.java | 24 public static final long DAY_IN_MILLIS = 24 * 60 * 60 * 1000; field in UnixCalendar 25 public static final long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS; 26 public static final long MONTH_IN_MILLIS = 30 * DAY_IN_MILLIS; 27 public static final long YEAR_IN_MILLIS = 365 * DAY_IN_MILLIS; 35 mTime += val * DAY_IN_MILLIS; in addDays()
|
D | UserUsageStatsService.java | 91 UnixCalendar.DAY_IN_MILLIS, UnixCalendar.WEEK_IN_MILLIS,
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | FileRotatorTest.java | 19 import static android.text.format.DateUtils.DAY_IN_MILLIS; 72 mBasePath, PREFIX, DAY_IN_MILLIS, WEEK_IN_MILLIS); in testEmpty() 74 mBasePath, ANOTHER_PREFIX, DAY_IN_MILLIS, WEEK_IN_MILLIS); in testEmpty() 90 mBasePath, PREFIX, DAY_IN_MILLIS, WEEK_IN_MILLIS); in testCombine() 111 mBasePath, PREFIX, DAY_IN_MILLIS, WEEK_IN_MILLIS); in testRotate() 129 currentTime += DAY_IN_MILLIS + SECOND_IN_MILLIS; in testRotate() 143 mBasePath, PREFIX, MINUTE_IN_MILLIS, DAY_IN_MILLIS); in testDelete() 161 currentTime = TEST_TIME + DAY_IN_MILLIS + (2 * MINUTE_IN_MILLIS); in testDelete() 173 mBasePath, PREFIX, MINUTE_IN_MILLIS, DAY_IN_MILLIS); in testThrowRestoresBackup() 243 currentTime += DAY_IN_MILLIS; in testQueryMatch() [all …]
|
/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 42 import static android.text.format.DateUtils.DAY_IN_MILLIS; 318 touch("file2", 1 * DAY_IN_MILLIS + HOUR_IN_MILLIS); in testDeleteOlderTypical() 319 touch("file3", 2 * DAY_IN_MILLIS + HOUR_IN_MILLIS); in testDeleteOlderTypical() 320 touch("file4", 3 * DAY_IN_MILLIS + HOUR_IN_MILLIS); in testDeleteOlderTypical() 321 touch("file5", 4 * DAY_IN_MILLIS + HOUR_IN_MILLIS); in testDeleteOlderTypical() 322 assertTrue(FileUtils.deleteOlderFiles(mDir, 3, DAY_IN_MILLIS)); in testDeleteOlderTypical() 331 assertTrue(FileUtils.deleteOlderFiles(mDir, 0, DAY_IN_MILLIS)); in testDeleteOlderInFuture() 337 assertTrue(FileUtils.deleteOlderFiles(mDir, 0, DAY_IN_MILLIS)); in testDeleteOlderInFuture() 344 touch("file2", 1 * DAY_IN_MILLIS + HOUR_IN_MILLIS); in testDeleteOlderOnlyAge() 345 touch("file3", 2 * DAY_IN_MILLIS + HOUR_IN_MILLIS); in testDeleteOlderOnlyAge() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/ |
D | NetworkCycleDataLoaderTest.java | 146 final long twoDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 2); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() 159 final long tenDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 10); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime() 160 final long twentyDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 20); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime() 161 final long thirtyDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 30); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime()
|
D | DataUsageControllerTest.java | 84 new NetworkStatsHistory(DateUtils.DAY_IN_MILLIS /* bucketDuration */)); in setUp()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/ |
D | StringUtilTest.java | 64 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS in testFormatElapsedTime_TimeMoreThanOneDay_ShowCorrectly() 74 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS in testFormatElapsedTime_TimeMoreThanOneDayAndCollapseTimeUnit_ShowCorrectly() 84 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS + 15 * DateUtils.MINUTE_IN_MILLIS; in testFormatElapsedTime_ZeroFieldsInTheMiddleDontShow() 199 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS; in testFormatRelativeTime_TwoDays_withSeconds()
|
/frameworks/base/core/java/android/text/format/ |
D | RelativeDateTimeFormatter.java | 50 public static final long DAY_IN_MILLIS = HOUR_IN_MILLIS * 24; field in RelativeDateTimeFormatter 51 public static final long WEEK_IN_MILLIS = DAY_IN_MILLIS * 7; 154 } else if (duration < DAY_IN_MILLIS && minResolution < DAY_IN_MILLIS) { in getRelativeTimeSpanString() 295 if (days > 0 && minResolution < DAY_IN_MILLIS) { in getRelativeDateTimeString() 296 minResolution = DAY_IN_MILLIS; in getRelativeDateTimeString()
|
D | DateUtils.java | 57 public static final long DAY_IN_MILLIS = HOUR_IN_MILLIS * 24; field in DateUtils 58 public static final long WEEK_IN_MILLIS = DAY_IN_MILLIS * 7; 849 if (span < DAY_IN_MILLIS && sNowTime.weekDay == sThenTime.weekDay) { in getRelativeTimeSpanString()
|
D | Time.java | 982 long julianDay = adjustedMillis / DateUtils.DAY_IN_MILLIS; in getJulianDay() 984 if (adjustedMillis < 0 && adjustedMillis % DateUtils.DAY_IN_MILLIS != 0) { in getJulianDay() 1014 long millis = (julianDay - EPOCH_JULIAN_DAY) * DateUtils.DAY_IN_MILLIS; in setJulianDay()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | CarrierKeyDownloadManager.java | 74 private static final int DAY_IN_MILLIS = 24 * 3600 * 1000; field in CarrierKeyDownloadManager 256 < System.currentTimeMillis() + END_RENEWAL_WINDOW_DAYS * DAY_IN_MILLIS)) { in getExpirationDate() 257 minExpirationDate = System.currentTimeMillis() + DAY_IN_MILLIS; in getExpirationDate() 262 int max = START_RENEWAL_WINDOW_DAYS * DAY_IN_MILLIS; in getExpirationDate() 263 int min = END_RENEWAL_WINDOW_DAYS * DAY_IN_MILLIS; in getExpirationDate() 534 return (timeToExpire < START_RENEWAL_WINDOW_DAYS * DAY_IN_MILLIS) ? true : false; in areCarrierKeysAbsentOrExpiring()
|
/frameworks/base/core/java/android/widget/ |
D | DateTimeView.java | 19 import static android.text.format.DateUtils.DAY_IN_MILLIS; 269 } else if (duration < DAY_IN_MILLIS) { 293 millisIncrease = DAY_IN_MILLIS; 377 } else if (duration < DAY_IN_MILLIS) { in onInitializeAccessibilityNodeInfoInternal()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/usage/ |
D | UserUsageStatsServiceTest.java | 52 private static final long TIME_INTERVAL_MILLIS = DateUtils.DAY_IN_MILLIS;
|
/frameworks/base/core/tests/coretests/src/com/android/internal/util/ |
D | TokenBucketTest.java | 60 drain(new TokenBucket((int) DateUtils.DAY_IN_MILLIS, 200), 200); in testInitialCapacity()
|
/frameworks/opt/calendar/src/com/android/calendarcommon2/ |
D | Time.java | 33 private static final long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS; field in Time 169 long millis = (julianDay - EPOCH_JULIAN_DAY) * DAY_IN_MILLIS; in setJulianDay()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/ |
D | JobSchedulerServiceTest.java | 19 import static android.text.format.DateUtils.DAY_IN_MILLIS; 243 createJobInfo().setPeriodic(2 * 365 * DAY_IN_MILLIS)); in testGetRescheduleJobForPeriodic_largePeriod() 246 assertEquals(now + 365 * DAY_IN_MILLIS, job.getLatestRunTimeElapsed()); in testGetRescheduleJobForPeriodic_largePeriod() 247 final long nextWindowStartTime = now + 365 * DAY_IN_MILLIS; in testGetRescheduleJobForPeriodic_largePeriod() 248 final long nextWindowEndTime = nextWindowStartTime + 365 * DAY_IN_MILLIS; in testGetRescheduleJobForPeriodic_largePeriod()
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsService.java | 69 import static android.text.format.DateUtils.DAY_IN_MILLIS; 1724 long duration = DateUtils.DAY_IN_MILLIS; 2215 getGlobalLong(NETSTATS_DEV_ROTATE_AGE, 15 * DAY_IN_MILLIS), 2216 getGlobalLong(NETSTATS_DEV_DELETE_AGE, 90 * DAY_IN_MILLIS)); 2225 getGlobalLong(NETSTATS_UID_ROTATE_AGE, 15 * DAY_IN_MILLIS), 2226 getGlobalLong(NETSTATS_UID_DELETE_AGE, 90 * DAY_IN_MILLIS)); 2231 getGlobalLong(NETSTATS_UID_TAG_ROTATE_AGE, 5 * DAY_IN_MILLIS), 2232 getGlobalLong(NETSTATS_UID_TAG_DELETE_AGE, 15 * DAY_IN_MILLIS));
|
D | NetworkStatsCollection.java | 233 (180 * DateUtils.DAY_IN_MILLIS) / mBucketDuration); in getHistory()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/ |
D | RecentLocationApps.java | 48 private static final long RECENT_TIME_INTERVAL_MILLIS = DateUtils.DAY_IN_MILLIS;
|
D | RecentLocationAccesses.java | 50 private static final long RECENT_TIME_INTERVAL_MILLIS = DateUtils.DAY_IN_MILLIS;
|
/frameworks/base/services/core/java/com/android/server/content/ |
D | SyncLogger.java | 221 final long day = now % DateUtils.DAY_IN_MILLIS; in openLogLocked()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | PackageInstallerService.java | 129 private static final long MAX_AGE_MILLIS = 3 * DateUtils.DAY_IN_MILLIS; 131 private static final long MAX_TIME_SINCE_UPDATE_MILLIS = 7 * DateUtils.DAY_IN_MILLIS;
|
/frameworks/base/core/java/android/provider/ |
D | CalendarContract.java | 2557 long ancient = now - DateUtils.DAY_IN_MILLIS; in rescheduleMissedAlarms()
|
/frameworks/base/services/people/java/com/android/server/people/data/ |
D | DataManager.java | 111 private static final long RECENT_NOTIFICATIONS_MAX_AGE_MS = 10 * DateUtils.DAY_IN_MILLIS;
|