Merge "Update battery settings remaining time format" into udc-dev am: e99f757f60 am: a823380436
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23199829 Change-Id: I3226b3667702f3f012d7fded5989ec0591e16aab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user