Merge "Update battery settings remaining time format" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e99f757f60
@@ -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