AI 146853: Add kernel wakelock data to batteryinfo dump.
BUG=1755458 Automated import of CL 146853
This commit is contained in:

committed by
The Android Open Source Project
parent
1f06e4f99b
commit
7e85a6f8c6
@@ -607,8 +607,8 @@ public class BatteryHistory extends Activity implements OnClickListener, OnItemS
|
|||||||
Timer timer = se.getSensorTime();
|
Timer timer = se.getSensorTime();
|
||||||
if (timer != null) {
|
if (timer != null) {
|
||||||
// Convert from microseconds to milliseconds with rounding
|
// Convert from microseconds to milliseconds with rounding
|
||||||
long totalTime = (timer.getTotalTime(uSecNow, mWhich) + 500) / 1000;
|
long totalTime = (timer.getTotalTimeLocked(uSecNow, mWhich) + 500) / 1000;
|
||||||
int count = timer.getCount(mWhich);
|
int count = timer.getCountLocked(mWhich);
|
||||||
if (handle == BatteryStats.Uid.Sensor.GPS) {
|
if (handle == BatteryStats.Uid.Sensor.GPS) {
|
||||||
timeGps += totalTime;
|
timeGps += totalTime;
|
||||||
countGps += count;
|
countGps += count;
|
||||||
@@ -655,8 +655,8 @@ public class BatteryHistory extends Activity implements OnClickListener, OnItemS
|
|||||||
Timer timer = wl.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL);
|
Timer timer = wl.getWakeTime(BatteryStats.WAKE_TYPE_PARTIAL);
|
||||||
if (timer != null) {
|
if (timer != null) {
|
||||||
// Convert from microseconds to milliseconds with rounding
|
// Convert from microseconds to milliseconds with rounding
|
||||||
time += (timer.getTotalTime(uSecNow, mWhich) + 500) / 1000;
|
time += (timer.getTotalTimeLocked(uSecNow, mWhich) + 500) / 1000;
|
||||||
count += timer.getCount(mWhich);
|
count += timer.getCountLocked(mWhich);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user