Use en-dash in the time range instead of a hyphen for different format
Expected format: 00:00–02:00 or (2pm – 4pm)
Screenshots:
https://screenshot.googleplex.com/4RvaovK6RN7kjqo
https://screenshot.googleplex.com/ADZRr2TPuuctFre
Bug: 229264053
Test: make RunSettingsRoboTests
Change-Id: Ifd9bea0ce4525c8b582778e255104e875d365563
diff --git a/src/com/android/settings/fuelgauge/BatteryChartPreferenceController.java b/src/com/android/settings/fuelgauge/BatteryChartPreferenceController.java
index 249ee49..02248c9 100644
--- a/src/com/android/settings/fuelgauge/BatteryChartPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/BatteryChartPreferenceController.java
@@ -508,7 +508,9 @@
mBatteryHistoryKeys[mTrapezoidIndex * 2], mIs24HourFormat);
final String toHour = ConvertUtils.utcToLocalTimeHour(mPrefContext,
mBatteryHistoryKeys[(mTrapezoidIndex + 1) * 2], mIs24HourFormat);
- return String.format("%s - %s", fromHour, toHour);
+ return mIs24HourFormat
+ ? String.format("%s–%s", fromHour, toHour)
+ : String.format("%s – %s", fromHour, toHour);
}
@VisibleForTesting