Fix b/265387286: The total percentage of all apps is not 100%
Bug: 265387286 Fix: 265387286 Test: manual Change-Id: I654f8211a45c818f9a2d4867ac679e72c9ce6eb1
This commit is contained in:
@@ -124,7 +124,7 @@ public class AppBatteryPreferenceController extends BasePreferenceController
|
||||
mParent.getMetricsCategory(),
|
||||
mBatteryDiffEntry,
|
||||
Utils.formatPercentage(
|
||||
mBatteryDiffEntry.getPercentOfTotal(), /* round */ true),
|
||||
mBatteryDiffEntry.getPercentage(), /* round */ true),
|
||||
/*slotInformation=*/ null, /*showTimeInformation=*/ false);
|
||||
return true;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ public class AppBatteryPreferenceController extends BasePreferenceController
|
||||
void updateBatteryWithDiffEntry() {
|
||||
if (mBatteryDiffEntry != null && mBatteryDiffEntry.mConsumePower > 0) {
|
||||
mBatteryPercent = Utils.formatPercentage(
|
||||
mBatteryDiffEntry.getPercentOfTotal(), /* round */ true);
|
||||
mBatteryDiffEntry.getPercentage(), /* round */ true);
|
||||
mPreference.setSummary(mContext.getString(
|
||||
R.string.battery_summary, mBatteryPercent));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user