Merge change 201 into donut
* changes:
Dismiss the dialog in onDestroy so that it doesn't leak on orientation change or other transitions.
diff --git a/src/com/android/settings/battery_history/BatteryHistory.java b/src/com/android/settings/battery_history/BatteryHistory.java
index ad6479a..06f38ae 100644
--- a/src/com/android/settings/battery_history/BatteryHistory.java
+++ b/src/com/android/settings/battery_history/BatteryHistory.java
@@ -607,8 +607,8 @@
Timer timer = se.getSensorTime();
if (timer != null) {
// Convert from microseconds to milliseconds with rounding
- long totalTime = (timer.getTotalTime(uSecNow, mWhich) + 500) / 1000;
- int count = timer.getCount(mWhich);
+ long totalTime = (timer.getTotalTimeLocked(uSecNow, mWhich) + 500) / 1000;
+ int count = timer.getCountLocked(mWhich);
if (handle == BatteryStats.Uid.Sensor.GPS) {
timeGps += totalTime;
countGps += count;
@@ -655,8 +655,8 @@
Timer timer = wl.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL);
if (timer != null) {
// Convert from microseconds to milliseconds with rounding
- time += (timer.getTotalTime(uSecNow, mWhich) + 500) / 1000;
- count += timer.getCount(mWhich);
+ time += (timer.getTotalTimeLocked(uSecNow, mWhich) + 500) / 1000;
+ count += timer.getCountLocked(mWhich);
}
}
}