Merge "Update battery settings remaining time format" into udc-dev

This commit is contained in:
Treehugger Robot
2023-05-12 12:29:14 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 50 deletions

View File

@@ -322,18 +322,11 @@ public class BatteryInfo {
final long drainTimeUs = PowerUtil.convertMsToUs(estimate.getEstimateMillis());
if (drainTimeUs > 0) {
info.remainingTimeUs = drainTimeUs;
info.remainingLabel = PowerUtil.getBatteryRemainingStringFormatted(
info.remainingLabel = PowerUtil.getBatteryRemainingShortStringFormatted(
context,
PowerUtil.convertUsToMs(drainTimeUs),
null /* percentageString */,
false /* basedOnUsage */
);
info.chargeLabel = PowerUtil.getBatteryRemainingStringFormatted(
context,
PowerUtil.convertUsToMs(drainTimeUs),
info.batteryPercentString,
estimate.isBasedOnUsage() && !shortString
PowerUtil.convertUsToMs(drainTimeUs)
);
info.chargeLabel = info.remainingLabel;
info.suggestionLabel = PowerUtil.getBatteryTipStringFormatted(
context, PowerUtil.convertUsToMs(drainTimeUs));
} else {