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

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

Change-Id: I4616826eb10441dd13c2eeec9c09262d86e23bcb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
ykhung
2022-04-17 15:23:35 +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