Merge "Only fillLowPowerStats when needed" into sc-dev am: e7c2db0c92 am: 2a46e572f4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15277352

Change-Id: If1182f10e883f8f289f03a0a8e5758d800b528b3
This commit is contained in:
TreeHugger Robot
2021-07-14 00:36:42 +00:00
committed by Automerger Merge Worker

View File

@@ -579,8 +579,10 @@ class BatteryExternalStatsWorker implements BatteryStatsImpl.ExternalStatsSync {
}
}
// Collect the latest low power stats without holding the mStats lock.
mStats.fillLowPowerStats();
if ((updateFlags & BatteryStatsImpl.ExternalStatsSync.UPDATE_RPM) != 0) {
// Collect the latest low power stats without holding the mStats lock.
mStats.fillLowPowerStats();
}
final WifiActivityEnergyInfo wifiInfo = awaitControllerInfo(wifiReceiver);
final BluetoothActivityEnergyInfo bluetoothInfo = awaitControllerInfo(bluetoothReceiver);