Fix usagestats DUMP OF SERVICE
DUMP OF SERVICE Usagestats was empty in bugreports
because an unexpected -a argument was being passed.
adb shell pm dump <package> had a similar issue with --packages
Change-Id: Ic67c723b8edc74ec7c9c48582b08896ca3430a4a
Fix: 70777338
Test: adb shell pm dump <package> and bugreports now contain usage stats
This commit is contained in:
@@ -3835,7 +3835,7 @@ public class ActivityManager {
|
||||
pw.println();
|
||||
dumpService(pw, fd, ProcessStats.SERVICE_NAME, new String[] { packageName });
|
||||
pw.println();
|
||||
dumpService(pw, fd, "usagestats", new String[] { "--packages", packageName });
|
||||
dumpService(pw, fd, "usagestats", new String[] { packageName });
|
||||
pw.println();
|
||||
dumpService(pw, fd, BatteryStats.SERVICE_NAME, new String[] { packageName });
|
||||
pw.flush();
|
||||
|
||||
@@ -492,8 +492,8 @@ public class UsageStatsService extends SystemService implements
|
||||
flushToDiskLocked();
|
||||
pw.println("Flushed stats to disk");
|
||||
return;
|
||||
} else {
|
||||
// Anything else is a pkg to filter
|
||||
} else if (arg != null && !arg.startsWith("-")) {
|
||||
// Anything else that doesn't start with '-' is a pkg to filter
|
||||
pkg = arg;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user