Only fillLowPowerStats when needed
This fixes a boottime regression. Prior to fix, FinishBooting took ~900ms to complete After fix, FinishBooting took ~120ms to complete Fixes: 193074223 Test: atest google/perf/boottime/boottime-test Change-Id: If85a93f1f92c8af8251c870bf576bb125778b011
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user