Home
last modified time | relevance | path

Searched refs:DateUtils (Results 1 – 25 of 153) sorted by relevance

1234567

/frameworks/base/core/tests/coretests/src/android/text/format/
DDateUtilsTest.java65 assertEquals("0 seconds", DateUtils.formatDuration(0)); in test_formatDuration_seconds()
66 assertEquals("0 seconds", DateUtils.formatDuration(1)); in test_formatDuration_seconds()
67 assertEquals("0 seconds", DateUtils.formatDuration(499)); in test_formatDuration_seconds()
68 assertEquals("1 second", DateUtils.formatDuration(500)); in test_formatDuration_seconds()
69 assertEquals("1 second", DateUtils.formatDuration(1000)); in test_formatDuration_seconds()
70 assertEquals("2 seconds", DateUtils.formatDuration(1500)); in test_formatDuration_seconds()
72 assertEquals("0 seconds", DateUtils.formatDuration(0, DateUtils.LENGTH_LONG)); in test_formatDuration_seconds()
73 assertEquals("1 second", DateUtils.formatDuration(1000, DateUtils.LENGTH_LONG)); in test_formatDuration_seconds()
74 assertEquals("2 seconds", DateUtils.formatDuration(1500, DateUtils.LENGTH_LONG)); in test_formatDuration_seconds()
76 assertEquals("0 sec", DateUtils.formatDuration(0, DateUtils.LENGTH_SHORT)); in test_formatDuration_seconds()
[all …]
DDateIntervalFormatTest.java22 import static android.text.format.DateUtils.FORMAT_12HOUR;
23 import static android.text.format.DateUtils.FORMAT_24HOUR;
24 import static android.text.format.DateUtils.FORMAT_ABBREV_ALL;
25 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
26 import static android.text.format.DateUtils.FORMAT_ABBREV_TIME;
27 import static android.text.format.DateUtils.FORMAT_ABBREV_WEEKDAY;
28 import static android.text.format.DateUtils.FORMAT_NO_MONTH_DAY;
29 import static android.text.format.DateUtils.FORMAT_NO_YEAR;
30 import static android.text.format.DateUtils.FORMAT_NUMERIC_DATE;
31 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/utils/
DStringUtilTest.java26 import android.text.format.DateUtils;
46 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()
64 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS in testFormatElapsedTime_TimeMoreThanOneDay_ShowCorrectly()
65 + 4 * DateUtils.HOUR_IN_MILLIS + 15 * DateUtils.MINUTE_IN_MILLIS; in testFormatElapsedTime_TimeMoreThanOneDay_ShowCorrectly()
74 final double testMillis = 2 * DateUtils.DAY_IN_MILLIS in testFormatElapsedTime_TimeMoreThanOneDayAndCollapseTimeUnit_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()
127 final double testMillis = 40 * DateUtils.SECOND_IN_MILLIS; in testFormatRelativeTime_WithSeconds_ShowSeconds()
[all …]
/frameworks/base/core/java/android/text/format/
DDateUtilsBridge.java19 import static android.text.format.DateUtils.FORMAT_12HOUR;
20 import static android.text.format.DateUtils.FORMAT_24HOUR;
21 import static android.text.format.DateUtils.FORMAT_ABBREV_ALL;
22 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
23 import static android.text.format.DateUtils.FORMAT_ABBREV_TIME;
24 import static android.text.format.DateUtils.FORMAT_ABBREV_WEEKDAY;
25 import static android.text.format.DateUtils.FORMAT_NO_MONTH_DAY;
26 import static android.text.format.DateUtils.FORMAT_NO_YEAR;
27 import static android.text.format.DateUtils.FORMAT_NUMERIC_DATE;
28 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
[all …]
DRelativeDateTimeFormatter.java19 import static android.text.format.DateUtils.FORMAT_ABBREV_ALL;
20 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
21 import static android.text.format.DateUtils.FORMAT_ABBREV_RELATIVE;
22 import static android.text.format.DateUtils.FORMAT_NO_YEAR;
23 import static android.text.format.DateUtils.FORMAT_NUMERIC_DATE;
24 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
25 import static android.text.format.DateUtils.FORMAT_SHOW_TIME;
26 import static android.text.format.DateUtils.FORMAT_SHOW_YEAR;
/frameworks/opt/timezonepicker/src/com/android/timezonepicker/
DTimeZoneInfo.java22 import android.text.format.DateUtils;
130 final long nowMinute = System.currentTimeMillis() / DateUtils.MINUTE_IN_MILLIS; in getGmtDisplayName()
131 final long now = nowMinute * DateUtils.MINUTE_IN_MILLIS; in getGmtDisplayName()
137 cacheKey = (int) (gmtOffset + 36 * DateUtils.HOUR_IN_MILLIS); in getGmtDisplayName()
139 cacheKey = (int) (gmtOffset - 36 * DateUtils.HOUR_IN_MILLIS); in getGmtDisplayName()
152 int flags = DateUtils.FORMAT_ABBREV_ALL; in getGmtDisplayName()
153 flags |= DateUtils.FORMAT_SHOW_TIME; in getGmtDisplayName()
155 flags |= DateUtils.FORMAT_24HOUR; in getGmtDisplayName()
159 DateUtils.formatDateRange(context, mFormatter, now, now, flags, mTzId); in getGmtDisplayName()
DTimeZonePickerUtils.java24 import android.text.format.DateUtils;
131 sb.append(p / DateUtils.HOUR_IN_MILLIS); // Hour in appendGmtOffset()
133 final int min = (p / (int) DateUtils.MINUTE_IN_MILLIS) % 60; in appendGmtOffset()
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/
DAlwaysOnDisplayPolicy.java27 import android.text.format.DateUtils;
44 private static final long DEFAULT_PROX_SCREEN_OFF_DELAY_MS = 10 * DateUtils.SECOND_IN_MILLIS;
45 private static final long DEFAULT_PROX_COOLDOWN_TRIGGER_MS = 2 * DateUtils.SECOND_IN_MILLIS;
46 private static final long DEFAULT_PROX_COOLDOWN_PERIOD_MS = 5 * DateUtils.SECOND_IN_MILLIS;
47 private static final long DEFAULT_WALLPAPER_VISIBILITY_MS = 60 * DateUtils.SECOND_IN_MILLIS;
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DAlwaysOnDisplayPolicyTest.java22 import android.text.format.DateUtils;
65 assertThat(policy.proxScreenOffDelayMs).isEqualTo(10 * DateUtils.SECOND_IN_MILLIS); in testPolicy_valueNull_containsDefaultValue()
66 assertThat(policy.proxCooldownTriggerMs).isEqualTo(2 * DateUtils.SECOND_IN_MILLIS); in testPolicy_valueNull_containsDefaultValue()
67 assertThat(policy.proxCooldownPeriodMs).isEqualTo(5 * DateUtils.SECOND_IN_MILLIS); in testPolicy_valueNull_containsDefaultValue()
/frameworks/base/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/
DRemoteWallpaperEffectsGenerationService.java24 import android.text.format.DateUtils;
41 private static final long TIMEOUT_REMOTE_REQUEST_MILLIS = 2 * DateUtils.SECOND_IN_MILLIS;
43 private static final long TIMEOUT_IDLE_BIND_MILLIS = 120 * DateUtils.SECOND_IN_MILLIS;
/frameworks/base/services/core/java/com/android/server/notification/
DCountdownConditionProvider.java30 import android.text.format.DateUtils;
124 DateUtils.getRelativeTimeSpanString(mTime, now, DateUtils.MINUTE_IN_MILLIS); in onSubscribe()
179 DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS); in tryParseDescription()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/ui/binder/
DSeekBarObserver.kt21 import android.text.format.DateUtils
131 DateUtils.formatElapsedTime(data.duration / DateUtils.SECOND_IN_MILLIS) in onChanged()
151 val elapsedTimeString = DateUtils.formatElapsedTime(it / DateUtils.SECOND_IN_MILLIS) in onChanged()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/
DNetworkCycleDataLoaderTest.java36 import android.text.format.DateUtils;
151 final long fourWeeksAgo = now - (DateUtils.WEEK_IN_MILLIS * 4); in loadFourWeeksData_shouldRecordUsageForLast4Weeks()
152 final long twoDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 2); in loadFourWeeksData_shouldRecordUsageForLast4Weeks()
164 final long tenDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 10); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime()
165 final long twentyDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 20); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime()
166 final long thirtyDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 30); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime()
DNetworkCycleDataForUidLoaderTest.java36 import android.text.format.DateUtils;
77 final long start = end - (DateUtils.WEEK_IN_MILLIS * 4); in recordUsage_shouldQueryNetworkDetailsForUidAndForegroundState()
94 final long start = end - (DateUtils.WEEK_IN_MILLIS * 4); in recordUsage_retrieveDetailIsFalse_shouldNotQueryNetworkForegroundState()
108 final long start = end - (DateUtils.WEEK_IN_MILLIS * 4); in recordUsage_multipleUids_shouldQueryNetworkDetailsForEachUid()
DNetworkCycleChartDataLoaderTest.java28 import android.text.format.DateUtils;
64 final long start = end - (DateUtils.WEEK_IN_MILLIS * 4); in recordUsage_shouldQueryNetworkSummaryForDevice()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageController.java20 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
21 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
31 import android.text.format.DateUtils;
109 start = now - DateUtils.WEEK_IN_MILLIS * 4; in getDataUsageInfo()
212 return DateUtils.formatDateRange(mContext, PERIOD_FORMATTER, start, end, flags, null) in formatDateRange()
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
DDateUtils.java25 public class DateUtils { class
27 private DateUtils() { in DateUtils() method in DateUtils
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DTokenBucketTest.java25 import android.text.format.DateUtils;
68 drain(new TokenBucket((int) DateUtils.MINUTE_IN_MILLIS, 50), 50); in testInitialCapacity()
69 drain(new TokenBucket((int) DateUtils.HOUR_IN_MILLIS, 10), 10); in testInitialCapacity()
70 drain(new TokenBucket((int) DateUtils.DAY_IN_MILLIS, 200), 200); in testInitialCapacity()
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DConversationStoreTest.java29 import android.text.format.DateUtils;
198 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/opt/telephony/src/java/com/android/internal/telephony/metrics/
DModemPowerMetrics.java23 import android.text.format.DateUtils;
59 / ((double) DateUtils.HOUR_IN_MILLIS); in buildProto()
105 / ((double) DateUtils.HOUR_IN_MILLIS); in buildProto()
/frameworks/base/services/smartspace/java/com/android/server/smartspace/
DRemoteSmartspaceService.java23 import android.text.format.DateUtils;
38 private static final long TIMEOUT_REMOTE_REQUEST_MILLIS = 2 * DateUtils.SECOND_IN_MILLIS;
/frameworks/base/services/searchui/java/com/android/server/searchui/
DRemoteSearchUiService.java23 import android.text.format.DateUtils;
38 private static final long TIMEOUT_REMOTE_REQUEST_MILLIS = 2 * DateUtils.SECOND_IN_MILLIS;
/frameworks/base/services/appprediction/java/com/android/server/appprediction/
DRemoteAppPredictionService.java23 import android.text.format.DateUtils;
38 private static final long TIMEOUT_REMOTE_REQUEST_MILLIS = 2 * DateUtils.SECOND_IN_MILLIS;
/frameworks/base/services/core/java/com/android/server/am/
DDropboxRateLimiter.java21 import android.text.format.DateUtils;
34 private static final long RATE_LIMIT_BUFFER_DURATION_DEFAULT = 10 * DateUtils.MINUTE_IN_MILLIS;
45 20 * DateUtils.MINUTE_IN_MILLIS;
/frameworks/base/services/musicrecognition/java/com/android/server/musicrecognition/
DRemoteMusicRecognitionService.java29 import android.text.format.DateUtils;
44 private static final long TIMEOUT_IDLE_BIND_MILLIS = 40 * DateUtils.SECOND_IN_MILLIS;

1234567