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:
@@ -108,7 +108,7 @@ private class AppBatteryPresenter(private val context: Context, private val app:
|
||||
private fun BatteryDiffEntry?.getSummary(): String =
|
||||
this?.takeIf { mConsumePower > 0 }?.let {
|
||||
context.getString(
|
||||
R.string.battery_summary, Utils.formatPercentage(percentOfTotal, true)
|
||||
R.string.battery_summary, Utils.formatPercentage(percentage, true)
|
||||
)
|
||||
} ?: context.getString(R.string.no_battery_summary)
|
||||
|
||||
@@ -127,7 +127,7 @@ private class AppBatteryPresenter(private val context: Context, private val app:
|
||||
context,
|
||||
AppInfoSettingsProvider.METRICS_CATEGORY,
|
||||
this,
|
||||
Utils.formatPercentage(percentOfTotal, true),
|
||||
Utils.formatPercentage(percentage, true),
|
||||
null,
|
||||
false,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user