Home
last modified time | relevance | path

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

123

/packages/modules/Connectivity/tests/unit/java/android/net/
DNetworkStatsHistoryTest.java31 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
136 final long BUCKET_SIZE = 15 * MINUTE_IN_MILLIS; in testRecordTouchingBuckets()
141 final long recordStart = (TEST_START + BUCKET_SIZE) - MINUTE_IN_MILLIS; in testRecordTouchingBuckets()
142 final long recordEnd = (TEST_START + (BUCKET_SIZE * 2)) + (MINUTE_IN_MILLIS * 4); in testRecordTouchingBuckets()
148 assertValues(stats, 0, MINUTE_IN_MILLIS, 50L, 100L, 250L, 500L, 5L); in testRecordTouchingBuckets()
150 assertValues(stats, 1, 15 * MINUTE_IN_MILLIS, 750L, 1500L, 3750L, 7500L, 75L); in testRecordTouchingBuckets()
152 assertValues(stats, 2, 4 * MINUTE_IN_MILLIS, 200L, 400L, 1000L, 2000L, 20L); in testRecordTouchingBuckets()
234 stats1.recordData(TEST_START, TEST_START + MINUTE_IN_MILLIS * 60, 600L, 600L); in testRecordEntireOverlapVaryingBuckets()
236 final long TEST_START_2 = TEST_START + MINUTE_IN_MILLIS; in testRecordEntireOverlapVaryingBuckets()
237 final NetworkStatsHistory stats2 = new NetworkStatsHistory(MINUTE_IN_MILLIS); in testRecordEntireOverlapVaryingBuckets()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/
DDates.java36 public static final long MINUTE_IN_MILLIS = SECOND_IN_MILLIS * 60; field in Dates
37 public static final long HOUR_IN_MILLIS = MINUTE_IN_MILLIS * 60;
67 if (now - time < DateUtils.MINUTE_IN_MILLIS) { in getRelativeTimeSpanString()
77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, in getRelativeTimeSpanString()
132 if (!minPeriodToday && timeDiff < DateUtils.MINUTE_IN_MILLIS) { in getTimestamp()
155 final long count = (timeDiff / MINUTE_IN_MILLIS); in getLessThanAnHourOldTimeString()
248 count = duration / MINUTE_IN_MILLIS; in getShortRelativeTimeSpanString()
/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DNetworkStatsCollectionTest.java29 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
121 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS); in testReadLegacyNetwork()
149 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS); in testReadLegacyUid()
177 final NetworkStatsCollection collection = new NetworkStatsCollection(30 * MINUTE_IN_MILLIS); in testReadLegacyUidTags()
206 collection.recordData(null, UID_ALL, SET_DEFAULT, TAG_NONE, 30 * MINUTE_IN_MILLIS, in testStartEndAtomicBuckets()
207 90 * MINUTE_IN_MILLIS, entry); in testStartEndAtomicBuckets()
228 collection.recordData(identSet, myUid, SET_DEFAULT, TAG_NONE, 0, 60 * MINUTE_IN_MILLIS, in testAccessLevels()
234 60 * MINUTE_IN_MILLIS, entry); in testAccessLevels()
239 60 * MINUTE_IN_MILLIS, entry); in testAccessLevels()
244 60 * MINUTE_IN_MILLIS, entry); in testAccessLevels()
[all …]
DNetworkStatsObserversTest.java30 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
307 xtSnapshot = new NetworkStats(TEST_START + MINUTE_IN_MILLIS, 1 /* initialSize */) in testUpdateStats_deviceAccess_notifies()
339 uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) in testUpdateStats_defaultAccess_notifiesSameUid()
372 uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) in testUpdateStats_defaultAccess_usageOtherUid_doesNotNotify()
404 uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) in testUpdateStats_userAccess_usageSameUser_notifies()
437 uidSnapshot = new NetworkStats(TEST_START + 2 * MINUTE_IN_MILLIS, 2 /* initialSize */) in testUpdateStats_userAccess_usageAnotherUser_doesNotNotify()
DNetworkStatsServiceTest.java63 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
509 expectSettings(0L, 30 * MINUTE_IN_MILLIS, WEEK_IN_MILLIS);
517 assertEquals(30 * MINUTE_IN_MILLIS, history.getBucketDuration());
677 incrementCurrentTime(MINUTE_IN_MILLIS);
690 incrementCurrentTime(MINUTE_IN_MILLIS);
710 incrementCurrentTime(MINUTE_IN_MILLIS);
769 incrementCurrentTime(MINUTE_IN_MILLIS);
784 incrementCurrentTime(MINUTE_IN_MILLIS);
800 incrementCurrentTime(MINUTE_IN_MILLIS);
814 incrementCurrentTime(MINUTE_IN_MILLIS);
[all …]
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DAdvancedPowerUsageDetail.java500 return backgroundTimeMs < DateUtils.MINUTE_IN_MILLIS ? in getAppFullChargeActiveSummary()
509 } else if (totalTimeMs < DateUtils.MINUTE_IN_MILLIS) { in getAppFullChargeActiveSummary()
512 } else if (backgroundTimeMs < DateUtils.MINUTE_IN_MILLIS) { in getAppFullChargeActiveSummary()
543 return backgroundTimeMs < DateUtils.MINUTE_IN_MILLIS in getAppPast24HrActiveSummary()
552 } else if (totalTimeMs < DateUtils.MINUTE_IN_MILLIS) { in getAppPast24HrActiveSummary()
555 } else if (backgroundTimeMs < DateUtils.MINUTE_IN_MILLIS) { in getAppPast24HrActiveSummary()
586 return backgroundTimeMs < DateUtils.MINUTE_IN_MILLIS ? in getAppActiveSummaryWithSlotTime()
597 } else if (totalTimeMs < DateUtils.MINUTE_IN_MILLIS) { in getAppActiveSummaryWithSlotTime()
601 } else if (backgroundTimeMs < DateUtils.MINUTE_IN_MILLIS) { in getAppActiveSummaryWithSlotTime()
/packages/apps/DocumentsUI/src/com/android/documentsui/util/
DFormatUtils.java50 } else if (millis >= DateUtils.MINUTE_IN_MILLIS) { in formatDuration()
52 (int) ((millis + DateUtils.MINUTE_IN_MILLIS / 2) / DateUtils.MINUTE_IN_MILLIS); in formatDuration()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryChartPreferenceControllerTest.java424 /*backgroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS)); in testSetPreferenceSummary_setBackgroundUsageTimeOnly()
447 /*foregroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS, in testSetPreferenceSummary_setTotalTimeIfBackgroundTimeLessThanAMinute()
460 /*foregroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS, in testSetPreferenceSummary_setTotalAndBackgroundUsageTime()
461 /*backgroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS)); in testSetPreferenceSummary_setTotalAndBackgroundUsageTime()
471 /*foregroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS, in testSetPreferenceSummary_notAllowShownPackage_setSummayAsNull()
472 /*backgroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS)); in testSetPreferenceSummary_notAllowShownPackage_setSummayAsNull()
484 /*foregroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS, in testValidateUsageTime_returnTrueIfBatteryDiffEntryIsValid()
485 /*backgroundUsageTimeInMs=*/ DateUtils.MINUTE_IN_MILLIS))) in testValidateUsageTime_returnTrueIfBatteryDiffEntryIsValid()
DBatteryAppListPreferenceControllerTest.java112 when(mBatteryEntry.getTimeInForegroundMs()).thenReturn(2 * DateUtils.MINUTE_IN_MILLIS); in testSetUsageSummary_timeMoreThanOneMinute_normalApp_setScreenSummary()
124 when(mBatteryEntry.getTimeInForegroundMs()).thenReturn(2 * DateUtils.MINUTE_IN_MILLIS); in testSetUsageSummary_timeMoreThanOneMinute_GoogleApp_shouldNotSetScreenSummary()
138 when(mBatteryEntry.getTimeInForegroundMs()).thenReturn(2 * DateUtils.MINUTE_IN_MILLIS); in testSetUsageSummary_timeMoreThanOneMinute_hiddenApp_setUsedSummary()
/packages/apps/DeskClock/src/com/android/deskclock/
DAlarmUtils.kt70 if (variableDelta < DateUtils.MINUTE_IN_MILLIS) { in formatElapsedTimeUntilAlarm()
77 val remainder = variableDelta % DateUtils.MINUTE_IN_MILLIS in formatElapsedTimeUntilAlarm()
78 variableDelta += if (remainder == 0L) 0 else DateUtils.MINUTE_IN_MILLIS - remainder in formatElapsedTimeUntilAlarm()
DTimerTextController.kt37 var minutes = (remainder / DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString()
38 remainder = (remainder % DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString()
DStopwatchTextController.kt43 val minutes = (remainder / DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString()
44 remainder = (remainder % DateUtils.MINUTE_IN_MILLIS).toInt() in setTimeString()
/packages/apps/DeskClock/src/com/android/deskclock/data/
DTimer.kt21 import android.text.format.DateUtils.MINUTE_IN_MILLIS in <lambda>()
312 setRemainingTime(MINUTE_IN_MILLIS) in <lambda>()
315 setRemainingTime(lastRemainingTime + MINUTE_IN_MILLIS) in <lambda>()
338 val MAX_LENGTH: Long = 99 * HOUR_IN_MILLIS + 99 * MINUTE_IN_MILLIS + 99 * SECOND_IN_MILLIS in <lambda>()
DTimerStringFormatter.kt21 import android.text.format.DateUtils.MINUTE_IN_MILLIS
39 var roundedMinutes = (remainingTime / MINUTE_IN_MILLIS % 60).toInt() in formatTimeRemaining()
DTimerNotificationBuilder.kt31 import android.text.format.DateUtils.MINUTE_IN_MILLIS
197 if (timer.isRunning && remainingTime > MINUTE_IN_MILLIS) { in build()
203 val nextMinuteChange: Long = remainingTime % MINUTE_IN_MILLIS in build()
/packages/apps/DeskClock/src/com/android/deskclock/uidata/
DPeriodicCallbackModel.kt161 private const val QUARTER_HOUR_IN_MILLIS = 15 * DateUtils.MINUTE_IN_MILLIS
181 val lastMinute = periodStart - periodStart % DateUtils.MINUTE_IN_MILLIS in getDelay()
182 val nextMinute = lastMinute + DateUtils.MINUTE_IN_MILLIS in getDelay()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DAbstractPublicApiTest.java21 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
147 if (timeout > MINUTE_IN_MILLIS) { in waitForStatus()
155 if (timeout > MINUTE_IN_MILLIS) { in waitForStatus()
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarConfidenceCheckerTest.java98 mInjectedRealtimeMillis += DateUtils.DAY_IN_MILLIS - (15 * DateUtils.MINUTE_IN_MILLIS); in testWithLastCheckTime()
112 mInjectedRealtimeMillis += DateUtils.DAY_IN_MILLIS - (15 * DateUtils.MINUTE_IN_MILLIS); in testWithLastCheckTime()
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/
DLapsAdapter.kt283 private val TEN_MINUTES: Long = 10 * DateUtils.MINUTE_IN_MILLIS
315 minutes = (remainder / DateUtils.MINUTE_IN_MILLIS).toInt() in formatTime()
316 remainder = (remainder % DateUtils.MINUTE_IN_MILLIS).toInt() in formatTime()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/tips/
DHighUsageTipTest.java45 private static final long SCREEN_TIME = 30 * DateUtils.MINUTE_IN_MILLIS;
46 private static final long LAST_FULL_CHARGE_TIME = 20 * DateUtils.MINUTE_IN_MILLIS;
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarConfidenceChecker.java51 15 * DateUtils.MINUTE_IN_MILLIS;
56 private static final long WTF_INTERVAL_MS = 60 * DateUtils.MINUTE_IN_MILLIS;
DCalendarAlarmManager.java111 (15 * DateUtils.MINUTE_IN_MILLIS);
315 String subQuerySuffix = " -(" + Reminders.MINUTES + "*" + +DateUtils.MINUTE_IN_MILLIS + ")" in scheduleNextAlarmLocked()
408 } else if (alarmTime > nextAlarmTime + DateUtils.MINUTE_IN_MILLIS) { in scheduleNextAlarmLocked()
/packages/apps/Dialer/java/com/android/dialer/calllogutils/
DCallLogDates.java60 DateUtils.MINUTE_IN_MILLIS, in newCallLogTimestampLabel()
68 timestampMillis, nowMillis, DateUtils.MINUTE_IN_MILLIS); in newCallLogTimestampLabel()
/packages/providers/DownloadProvider/src/com/android/providers/downloads/
DDownloadScanner.java19 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
45 private static final long SCAN_TIMEOUT = MINUTE_IN_MILLIS;
/packages/apps/DeskClock/tests/src/com/android/deskclock/timer/
DTimerSetupViewTest.java44 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
269 hours * HOUR_IN_MILLIS + minutes * MINUTE_IN_MILLIS + seconds * SECOND_IN_MILLIS; in assertHasValue()

123