Use en-dash in the time range instead of a hyphen for different format am: 91adbd3b16 am: 24707ec043

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17782706

Change-Id: Ic4d40a82533cef9fb9792016bd0eda6044ef8ab7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
ykhung
2022-04-17 15:38:29 +00:00
committed by Automerger Merge Worker

View File

@@ -508,7 +508,9 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
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