Home
last modified time | relevance | path

Searched refs:formatter (Results 1 – 25 of 45) sorted by relevance

12

/frameworks/base/core/java/android/text/format/
DDateTimeFormat.java49 DateFormat formatter = CACHED_FORMATTERS.get(key); in format() local
50 if (formatter == null) { in format()
53 formatter = new SimpleDateFormat(generator.getBestPattern(skeleton), icuLocale); in format()
54 CACHED_FORMATTERS.put(key, formatter); in format()
56 formatter.setContext(displayContext); in format()
57 return formatter.format(time); in format()
DDateIntervalFormat.java100 android.icu.text.DateIntervalFormat formatter = in formatDateRange() local
102 return formatter.format(startCalendar, endCalendar, new StringBuffer(), in formatDateRange()
110 android.icu.text.DateIntervalFormat formatter = CACHED_FORMATTERS.get(key); in getFormatter() local
111 if (formatter != null) { in getFormatter()
112 return formatter; in getFormatter()
114 formatter = android.icu.text.DateIntervalFormat.getInstance(skeleton, locale); in getFormatter()
115 formatter.setTimeZone(icuTimeZone); in getFormatter()
116 CACHED_FORMATTERS.put(key, formatter); in getFormatter()
117 return formatter; in getFormatter()
DDateUtils.java417 final MeasureFormat formatter = MeasureFormat.getInstance(Locale.getDefault(), width); in formatDuration() local
420 return formatter.format(new Measure(hours, MeasureUnit.HOUR)); in formatDuration()
423 return formatter.format(new Measure(minutes, MeasureUnit.MINUTE)); in formatDuration()
426 return formatter.format(new Measure(seconds, MeasureUnit.SECOND)); in formatDuration()
583 public static Formatter formatDateRange(Context context, Formatter formatter, long startMillis, in formatDateRange() argument
585 return formatDateRange(context, formatter, startMillis, endMillis, flags, null); in formatDateRange()
751 public static Formatter formatDateRange(Context context, Formatter formatter, long startMillis, in formatDateRange() argument
762 formatter.out().append(range); in formatDateRange()
766 return formatter; in formatDateRange()
DRelativeDateTimeFormatter.java226 android.icu.text.RelativeDateTimeFormatter formatter = in getRelativeTimeSpanString() local
229 return formatter.format(count, direction, unit); in getRelativeTimeSpanString()
231 return formatter.format(direction, aunit); in getRelativeTimeSpanString()
340 android.icu.text.RelativeDateTimeFormatter formatter = CACHED_FORMATTERS.get(key); in getFormatter() local
341 if (formatter == null) { in getFormatter()
342 formatter = android.icu.text.RelativeDateTimeFormatter.getInstance( in getFormatter()
344 CACHED_FORMATTERS.put(key, formatter); in getFormatter()
346 return formatter; in getFormatter()
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DTestUtils.java32 DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"); in timestamp() local
33 return toEpochMilli(LocalDateTime.parse(str, formatter)); in timestamp()
/frameworks/base/cmds/uiautomator/cmds/uiautomator/src/com/android/commands/uiautomator/
DEventsCommand.java59 SimpleDateFormat formatter = new SimpleDateFormat("MM-dd HH:mm:ss.SSS"); in run()
61 formatter.format(new Date()), event.toString())); in run()
/frameworks/base/packages/SystemUI/src/com/android/systemui/brightness/ui/compose/
DBrightnessSlider.kt56 formatter: (Int) -> String = { "$it" }, in <lambda>()
89 Text(text = formatter(value)) in isDragging()
127 formatter = viewModel::formatValue, in BrightnessSliderContainer()
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
DTrackerDataHelper.java59 public TrackerDataHelper(Context context, IFormatter formatter) { in TrackerDataHelper() argument
61 mFormatter = formatter; in TrackerDataHelper()
/frameworks/base/services/core/java/com/android/server/inputmethod/
DImeTrackerService.java281 final var formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS", Locale.US) in dump() local
288 dumpEntry(entry, pw, prefix + " ", formatter); in dump()
294 dumpEntry(entry, pw, prefix + " ", formatter); in dump()
300 @NonNull String prefix, @NonNull DateTimeFormatter formatter) { in dumpEntry() argument
309 pw.print(" startTime=" + formatter.format(Instant.ofEpochMilli(entry.mStartTime))); in dumpEntry()
DStartInputHistory.java145 final DateTimeFormatter formatter = in dump() local
158 pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime)) in dump()
DSoftInputShowHideHistory.java95 final DateTimeFormatter formatter = in dump() local
108 pw.println(" time=" + formatter.format(Instant.ofEpochMilli(entry.mWallTime)) in dump()
/frameworks/base/core/java/android/text/style/
DTtsSpan.java840 NumberFormat formatter = NumberFormat.getInstance(Locale.US); in setArgumentsFromDouble() local
841 formatter.setMinimumFractionDigits(maximumFractionDigits); in setArgumentsFromDouble()
842 formatter.setMaximumFractionDigits(maximumFractionDigits); in setArgumentsFromDouble()
843 formatter.setGroupingUsed(false); in setArgumentsFromDouble()
844 String str = formatter.format(number); in setArgumentsFromDouble()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/uimodenight/domain/
DUiModeNightTileMapper.kt71 val formatter: DateTimeFormatter = in map() constant
79 formatter.format(time) in map()
/frameworks/base/core/java/android/app/admin/
DFreezePeriod.java178 DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMM dd"); in toString() local
179 return LocalDate.ofYearDay(SENTINEL_YEAR, mStartDay).format(formatter) + " - " in toString()
180 + LocalDate.ofYearDay(SENTINEL_YEAR, mEndDay).format(formatter); in toString()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/night/ui/
DNightDisplayTileMapper.kt105 val formatter = if (data.is24HourFormat) formatter24Hour else formatter12Hour in getSecondaryLabel() constant
106 val formatArg = formatter.format(toggleTime) in getSecondaryLabel()
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/
DMainActivity.java224 DecimalFormat formatter = new DecimalFormat("#,###"); in onPostExecute() local
232 buffer.append(tag + ":" + formatter.format(t1) + ":" + in onPostExecute()
233 formatter.format(t2) + ":" + in onPostExecute()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DStringUtil.java159 final RelativeDateTimeFormatter formatter = RelativeDateTimeFormatter.getInstance( in formatRelativeTime() local
165 return formatter.format(value, RelativeDateTimeFormatter.Direction.LAST, unit); in formatRelativeTime()
/frameworks/base/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/chart/
DBarChartEntry.kt27 import com.github.mikephil.charting.formatter.IAxisValueFormatter in <lambda>()
/frameworks/base/tests/backup/src/com/android/backuptest/
DBackupTestActivity.java82 DateFormat formatter = DateFormat.getDateTimeInstance();
83 output.println(formatter.format(new Date()));
/frameworks/base/core/java/com/android/internal/os/
DLoggingPrintStream.java186 private final Formatter formatter = new Formatter(builder, null); field in LoggingPrintStream
195 formatter.format(l, format, args); in format()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/
DUiModeNightTile.java66 public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("hh:mm a"); field in UiModeNightTile
148 use24HourFormat ? time.toString() : formatter.format(time)); in handleUpdateState()
/frameworks/base/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/
DDynamicCodeLoggerIntegrationTests.java416 Formatter formatter = new Formatter(); in toHexString() local
418 formatter.format("%02X", b); in toHexString()
421 return formatter.toString(); in toHexString()
/frameworks/base/packages/SettingsLib/Spa/screenshot/src/com/android/settingslib/spa/screenshot/widget/chart/
DLineChartScreenshotTest.kt23 import com.github.mikephil.charting.formatter.IAxisValueFormatter in <lambda>()
DBarChartScreenshotTest.kt24 import com.github.mikephil.charting.formatter.IAxisValueFormatter in <lambda>()
/frameworks/base/samples/training/network-usage/src/com/example/android/networkusage/
DNetworkActivity.java223 DateFormat formatter = new SimpleDateFormat("MMM dd h:mmaa"); in loadXmlFromNetwork() local
232 formatter.format(rightNow.getTime()) + "</em>"); in loadXmlFromNetwork()

12