Merge "Only fillLowPowerStats when needed" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-07-14 00:15:26 +00:00
committed by Android (Google) Code Review

View File

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