Fix issue #1769910 (Track activity launch times)
The usage stats service now collects per-activity launch time stats. There are a number of fixes and improvements to its statistics management and collection; it now operates its calendar in GMT and ensures that for checkin purposes it always reports one day and only one complete day to the checkin service.
Also change the checkin option from "-c" to "--checkin" since it is really a special thing.
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index d676c00..59aa29f 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -1270,7 +1270,7 @@
mBatteryStatsService.getActiveStatistics().writeLocked();
mUsageStatsService = new UsageStatsService( new File(
- systemDir, "usagestats.bin").toString());
+ systemDir, "usagestats").toString());
mConfiguration.makeDefault();
mProcessStats.init();
@@ -8401,7 +8401,7 @@
private static final void dumpApplicationMemoryUsage(FileDescriptor fd,
PrintWriter pw, List list, String prefix, String[] args) {
- final boolean isCheckinRequest = scanArgs(args, "-c");
+ final boolean isCheckinRequest = scanArgs(args, "--checkin");
long uptime = SystemClock.uptimeMillis();
long realtime = SystemClock.elapsedRealtime();