Home
last modified time | relevance | path

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

1234

/frameworks/base/core/tests/coretests/src/android/text/format/
DDateUtilsTest.java27 assertEquals("0 seconds", DateUtils.formatDuration(0)); in test_formatDuration_seconds()
28 assertEquals("0 seconds", DateUtils.formatDuration(1)); in test_formatDuration_seconds()
29 assertEquals("0 seconds", DateUtils.formatDuration(499)); in test_formatDuration_seconds()
30 assertEquals("1 second", DateUtils.formatDuration(500)); in test_formatDuration_seconds()
31 assertEquals("1 second", DateUtils.formatDuration(1000)); in test_formatDuration_seconds()
32 assertEquals("2 seconds", DateUtils.formatDuration(1500)); in test_formatDuration_seconds()
38 assertEquals("59 seconds", DateUtils.formatDuration(59000)); in test_formatDuration_Minutes()
39 assertEquals("60 seconds", DateUtils.formatDuration(59500)); in test_formatDuration_Minutes()
40 assertEquals("1 minute", DateUtils.formatDuration(60000)); in test_formatDuration_Minutes()
41 assertEquals("2 minutes", DateUtils.formatDuration(120000)); in test_formatDuration_Minutes()
[all …]
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
DShared.java26 import android.text.format.DateUtils;
134 int flags = DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_NO_MIDNIGHT in formatTime()
135 | DateUtils.FORMAT_ABBREV_ALL; in formatTime()
138 flags |= DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_DATE; in formatTime()
140 flags |= DateUtils.FORMAT_SHOW_DATE; in formatTime()
142 flags |= DateUtils.FORMAT_SHOW_TIME; in formatTime()
145 return DateUtils.formatDateTime(context, when, flags); in formatTime()
DDocumentsApplication.java30 import android.text.format.DateUtils;
33 private static final long PROVIDER_ANR_TIMEOUT = 20 * DateUtils.SECOND_IN_MILLIS;
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/date/
DAccessibleDateAnimator.java20 import android.text.format.DateUtils;
44 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | in dispatchPopulateAccessibilityEvent()
45 DateUtils.FORMAT_SHOW_WEEKDAY; in dispatchPopulateAccessibilityEvent()
47 String dateString = DateUtils.formatDateTime(getContext(), mDateMillis, flags); in dispatchPopulateAccessibilityEvent()
DDatePickerDialog.java24 import android.text.format.DateUtils;
307 int flags = DateUtils.FORMAT_SHOW_DATE; in setCurrentView()
308 String dayString = DateUtils.formatDateTime(getActivity(), millis, flags); in setCurrentView()
348 int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NO_YEAR; in updateDisplay()
349 String monthAndDayText = DateUtils.formatDateTime(getActivity(), millis, flags); in updateDisplay()
353 flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR; in updateDisplay()
354 String fullDateText = DateUtils.formatDateTime(getActivity(), millis, flags); in updateDisplay()
/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/opt/telephony/src/java/android/telephony/
DCellBroadcastMessage.java25 import android.text.format.DateUtils;
422 int flags = DateUtils.FORMAT_NO_NOON_MIDNIGHT | DateUtils.FORMAT_SHOW_TIME | in getDateString()
423 DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE | in getDateString()
424 DateUtils.FORMAT_CAP_AMPM; in getDateString()
425 return DateUtils.formatDateTime(context, mDeliveryTime, flags); in getDateString()
434 int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE; in getSpokenDateString()
435 return DateUtils.formatDateTime(context, mDeliveryTime, flags); in getSpokenDateString()
/frameworks/support/v7/appcompat/src/android/support/v7/app/
DTwilightCalculator.java19 import android.text.format.DateUtils;
86 final float daysSince2000 = (float) (time - UTC_2000) / DateUtils.DAY_IN_MILLIS; in calculateTwilight()
127 sunset = Math.round((solarTransitJ2000 + hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000; in calculateTwilight()
128 sunrise = Math.round((solarTransitJ2000 - hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000; in calculateTwilight()
DTwilightManager.java26 import android.text.format.DateUtils;
147 calculator.calculateTwilight(now - DateUtils.DAY_IN_MILLIS, in updateState()
158 calculator.calculateTwilight(now + DateUtils.DAY_IN_MILLIS, in updateState()
166 nextUpdate = now + 12 * DateUtils.HOUR_IN_MILLIS; in updateState()
176 nextUpdate += DateUtils.MINUTE_IN_MILLIS; in updateState()
/frameworks/base/services/core/java/com/android/server/notification/
DCountdownConditionProvider.java30 import android.text.format.DateUtils;
123 DateUtils.getRelativeTimeSpanString(mTime, now, DateUtils.MINUTE_IN_MILLIS); in onSubscribe()
167 DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS); in tryParseDescription()
/frameworks/base/core/tests/coretests/src/android/util/
DTokenBucketTest.java20 import android.text.format.DateUtils;
57 drain(new TokenBucket((int)DateUtils.MINUTE_IN_MILLIS, 50), 50); in testInitialCapacity()
58 drain(new TokenBucket((int)DateUtils.HOUR_IN_MILLIS, 10), 10); in testInitialCapacity()
59 drain(new TokenBucket((int)DateUtils.DAY_IN_MILLIS, 200), 200); in testInitialCapacity()
/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/android/text/method/
DKeyListenerTestCase.java21 import android.text.format.DateUtils;
54 assertTrue(mActivity.waitForWindowFocus(5 * DateUtils.SECOND_IN_MILLIS)); in setUp()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageController.java31 import android.text.format.DateUtils;
44 import static android.text.format.DateUtils.FORMAT_ABBREV_MONTH;
45 import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
162 start = now - DateUtils.WEEK_IN_MILLIS * 4; in getDataUsageInfo()
249 return DateUtils.formatDateRange(mContext, PERIOD_FORMATTER, start, end, flags, null) in formatDateRange()
/frameworks/base/services/usage/java/com/android/server/usage/
DUserUsageStatsService.java30 import android.text.format.DateUtils;
54 DateUtils.FORMAT_SHOW_DATE
55 | DateUtils.FORMAT_SHOW_TIME
56 | DateUtils.FORMAT_SHOW_YEAR
57 | DateUtils.FORMAT_NUMERIC_DATE;
486 return "\"" + DateUtils.formatDateTime(mContext, dateTime, sDateFormatFlags) + "\""; in formatDateTime()
493 return "\"" + DateUtils.formatElapsedTime(elapsedTime / 1000) + "\""; in formatElapsedTime()
501 pw.printPair("timeRange", "\"" + DateUtils.formatDateRange(mContext, in printIntervalStats()
/frameworks/base/packages/Shell/src/com/android/shell/
DRemoteBugreportReceiver.java33 import android.text.format.DateUtils;
49 private static final long MIN_KEEP_AGE = DateUtils.DAY_IN_MILLIS;
DBugreportReceiver.java32 import android.text.format.DateUtils;
51 private static final long MIN_KEEP_AGE = DateUtils.WEEK_IN_MILLIS;
/frameworks/base/services/core/java/com/android/server/connectivity/
DMetricsLoggerService.java30 import android.text.format.DateUtils;
66 private final long THROTTLING_TIME_INTERVAL_MILLIS = DateUtils.HOUR_IN_MILLIS;
171 DateUtils.formatElapsedTime( in dump()
203 DateUtils.formatElapsedTime( in dump()
DLingerMonitor.java27 import android.text.format.DateUtils;
57 public static final long DEFAULT_NOTIFICATION_RATE_LIMIT_MILLIS = DateUtils.MINUTE_IN_MILLIS;
294 if (millisSinceFirst > DateUtils.DAY_IN_MILLIS) { in isAboveDailyLimit()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DFileRotatorTest.java19 import static android.text.format.DateUtils.DAY_IN_MILLIS;
20 import static android.text.format.DateUtils.HOUR_IN_MILLIS;
21 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
22 import static android.text.format.DateUtils.SECOND_IN_MILLIS;
23 import static android.text.format.DateUtils.WEEK_IN_MILLIS;
24 import static android.text.format.DateUtils.YEAR_IN_MILLIS;
/frameworks/base/core/java/android/widget/
DAnalogClock.java28 import android.text.format.DateUtils;
267 final int flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_24HOUR; in updateContentDescription()
268 String contentDescription = DateUtils.formatDateTime(mContext, in updateContentDescription()
DChronometer.java23 import android.text.format.DateUtils;
265 String text = DateUtils.formatElapsedTime(mRecycle, seconds); in updateText()
328 int duration = (int) (ms / DateUtils.SECOND_IN_MILLIS); in formatDuration()
DTimePickerSpinnerDelegate.java23 import android.text.format.DateUtils;
408 int flags = DateUtils.FORMAT_SHOW_TIME; in onPopulateAccessibilityEvent()
410 flags |= DateUtils.FORMAT_24HOUR; in onPopulateAccessibilityEvent()
412 flags |= DateUtils.FORMAT_12HOUR; in onPopulateAccessibilityEvent()
416 String selectedDateUtterance = DateUtils.formatDateTime(mContext, in onPopulateAccessibilityEvent()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DRemoteBugreportUtils.java28 import android.text.format.DateUtils;
50 static final long REMOTE_BUGREPORT_TIMEOUT_MILLIS = 10 * DateUtils.MINUTE_IN_MILLIS;

1234