Merge \\\"Prevent early boot crash reading PowerProfile\\\" into nyc-dev am: ec6db57ac7 am: 31ef27c249

am: 965ed1170b

Change-Id: I076e5933a1cd3f93fedd044c835b790e0ad11818
This commit is contained in:
Adam Lesinski
2016-06-22 17:47:02 +00:00
committed by android-build-merger

View File

@@ -8186,7 +8186,12 @@ public class BatteryStatsImpl extends BatteryStats {
for (int i=0; i<NUM_SCREEN_BRIGHTNESS_BINS; i++) {
mScreenBrightnessTimer[i].reset(false);
}
mEstimatedBatteryCapacity = (int) mPowerProfile.getBatteryCapacity();
if (mPowerProfile != null) {
mEstimatedBatteryCapacity = (int) mPowerProfile.getBatteryCapacity();
} else {
mEstimatedBatteryCapacity = -1;
}
mInteractiveTimer.reset(false);
mPowerSaveModeEnabledTimer.reset(false);
mLastIdleTimeStart = elapsedRealtimeMillis;