Merge "Prevent early boot crash reading PowerProfile" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ec6db57ac7
@@ -8186,7 +8186,12 @@ public class BatteryStatsImpl extends BatteryStats {
|
|||||||
for (int i=0; i<NUM_SCREEN_BRIGHTNESS_BINS; i++) {
|
for (int i=0; i<NUM_SCREEN_BRIGHTNESS_BINS; i++) {
|
||||||
mScreenBrightnessTimer[i].reset(false);
|
mScreenBrightnessTimer[i].reset(false);
|
||||||
}
|
}
|
||||||
mEstimatedBatteryCapacity = (int) mPowerProfile.getBatteryCapacity();
|
|
||||||
|
if (mPowerProfile != null) {
|
||||||
|
mEstimatedBatteryCapacity = (int) mPowerProfile.getBatteryCapacity();
|
||||||
|
} else {
|
||||||
|
mEstimatedBatteryCapacity = -1;
|
||||||
|
}
|
||||||
mInteractiveTimer.reset(false);
|
mInteractiveTimer.reset(false);
|
||||||
mPowerSaveModeEnabledTimer.reset(false);
|
mPowerSaveModeEnabledTimer.reset(false);
|
||||||
mLastIdleTimeStart = elapsedRealtimeMillis;
|
mLastIdleTimeStart = elapsedRealtimeMillis;
|
||||||
|
|||||||
Reference in New Issue
Block a user