diff options
author | Dianne Hackborn <hackbod@google.com> | 2014-05-15 17:05:22 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2014-05-16 10:46:33 -0700 |
commit | 9a7554300637902bbb25991ffba41a9b8f682eff (patch) | |
tree | 0243a39c0a5837d4fe86215a28003df91216315f /services | |
parent | 00bcf01a916938c5be4ca84c5fd8a3d6f502edb9 (diff) | |
download | frameworks_base-9a7554300637902bbb25991ffba41a9b8f682eff.zip frameworks_base-9a7554300637902bbb25991ffba41a9b8f682eff.tar.gz frameworks_base-9a7554300637902bbb25991ffba41a9b8f682eff.tar.bz2 |
Fix recording of wake_lock_in.
There was a bug that would allow the nesting count
to get off. Also better documentation of times in
HistoryItem, and new option to disable resetting of
the stats when unplugging.
Change-Id: If1b39a02475c5b620c67b700a323a6d0462d5c61
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/am/BatteryStatsService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java index 908bfbd..249422b 100644 --- a/services/core/java/com/android/server/am/BatteryStatsService.java +++ b/services/core/java/com/android/server/am/BatteryStatsService.java @@ -623,8 +623,8 @@ public final class BatteryStatsService extends IBatteryStats.Stub pw.println(" --charged: only output data since last charged."); pw.println(" --reset: reset the stats, clearing all current data."); pw.println(" --write: force write current collected stats to disk."); - pw.println(" --enable: enable an option: full-wake-history."); - pw.println(" --disable: disable an option: full-wake-history."); + pw.println(" --enable: enable an option: full-wake-history, no-auto-reset."); + pw.println(" --disable: disable an option: full-wake-history, no-auto-reset."); pw.println(" -h: print this help text."); pw.println(" <package.name>: optional name of package to filter output by."); } @@ -640,6 +640,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub synchronized (mStats) { mStats.setRecordAllWakeLocksLocked(enable); } + } else if ("no-auto-reset".equals(args[i])) { + synchronized (mStats) { + mStats.setNoAutoReset(enable); + } } else { pw.println("Unknown enable/disable option: " + args[i]); dumpHelp(pw); |