Update the selected period message in battery chart
screenshots: https://drive.google.com/drive/folders/1pxyrmaerZbD2FdEJohnsgqACXXno1Ve5?resourcekey=0-SXu6D9TLvmXDVgVKkZge8Q&usp=sharing Next cl will change "last 24hr" to "last full charge". Test: manual Bug: 236101166 Change-Id: If850d65056add04f0b2ecb6aed418e799ae15fb6
This commit is contained in:
@@ -150,10 +150,12 @@ public final class ConvertUtils {
|
||||
}
|
||||
|
||||
/** Converts UTC timestamp to local time day of week data. */
|
||||
public static String utcToLocalTimeDayOfWeek(final Context context, final long timestamp) {
|
||||
public static String utcToLocalTimeDayOfWeek(
|
||||
final Context context, final long timestamp, final boolean isAbbreviation) {
|
||||
final Locale locale = getLocale(context);
|
||||
final String pattern = DateFormat.getBestDateTimePattern(locale, "E");
|
||||
return DateFormat.format(pattern, timestamp).toString().toUpperCase(locale);
|
||||
final String pattern = DateFormat.getBestDateTimePattern(locale,
|
||||
isAbbreviation ? "E" : "EEEE");
|
||||
return DateFormat.format(pattern, timestamp).toString();
|
||||
}
|
||||
|
||||
/** Gets indexed battery usage data for each corresponding time slot. */
|
||||
|
||||
Reference in New Issue
Block a user