Merge "Add the individual wakeup alarm counts to the batterystats checkin." into nyc-dev
This commit is contained in:
@@ -189,6 +189,7 @@ public abstract class BatteryStats implements Parcelable {
|
|||||||
|
|
||||||
private static final String VERSION_DATA = "vers";
|
private static final String VERSION_DATA = "vers";
|
||||||
private static final String UID_DATA = "uid";
|
private static final String UID_DATA = "uid";
|
||||||
|
private static final String WAKEUP_ALARM_DATA = "wua";
|
||||||
private static final String APK_DATA = "apk";
|
private static final String APK_DATA = "apk";
|
||||||
private static final String PROCESS_DATA = "pr";
|
private static final String PROCESS_DATA = "pr";
|
||||||
private static final String CPU_DATA = "cpu";
|
private static final String CPU_DATA = "cpu";
|
||||||
@@ -3251,7 +3252,10 @@ public abstract class BatteryStats implements Parcelable {
|
|||||||
int wakeups = 0;
|
int wakeups = 0;
|
||||||
final ArrayMap<String, ? extends Counter> alarms = ps.getWakeupAlarmStats();
|
final ArrayMap<String, ? extends Counter> alarms = ps.getWakeupAlarmStats();
|
||||||
for (int iwa=alarms.size()-1; iwa>=0; iwa--) {
|
for (int iwa=alarms.size()-1; iwa>=0; iwa--) {
|
||||||
wakeups += alarms.valueAt(iwa).getCountLocked(which);
|
int count = alarms.valueAt(iwa).getCountLocked(which);
|
||||||
|
wakeups += count;
|
||||||
|
String name = alarms.keyAt(iwa).replace(',', '_');
|
||||||
|
dumpLine(pw, uid, category, WAKEUP_ALARM_DATA, name, count);
|
||||||
}
|
}
|
||||||
final ArrayMap<String, ? extends Uid.Pkg.Serv> serviceStats = ps.getServiceStats();
|
final ArrayMap<String, ? extends Uid.Pkg.Serv> serviceStats = ps.getServiceStats();
|
||||||
for (int isvc=serviceStats.size()-1; isvc>=0; isvc--) {
|
for (int isvc=serviceStats.size()-1; isvc>=0; isvc--) {
|
||||||
|
|||||||
@@ -1091,7 +1091,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
|||||||
pw.println(" [--daily] [--reset] [--write] [--new-daily] [--read-daily] [-h] [<package.name>]");
|
pw.println(" [--daily] [--reset] [--write] [--new-daily] [--read-daily] [-h] [<package.name>]");
|
||||||
pw.println(" --checkin: generate output for a checkin report; will write (and clear) the");
|
pw.println(" --checkin: generate output for a checkin report; will write (and clear) the");
|
||||||
pw.println(" last old completed stats when they had been reset.");
|
pw.println(" last old completed stats when they had been reset.");
|
||||||
pw.println(" --c: write the current stats in checkin format.");
|
pw.println(" -c: write the current stats in checkin format.");
|
||||||
pw.println(" --history: show only history data.");
|
pw.println(" --history: show only history data.");
|
||||||
pw.println(" --history-start <num>: show only history data starting at given time offset.");
|
pw.println(" --history-start <num>: show only history data starting at given time offset.");
|
||||||
pw.println(" --charged: only output data since last charged.");
|
pw.println(" --charged: only output data since last charged.");
|
||||||
|
|||||||
Reference in New Issue
Block a user