Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 838ea244 authored by Esteban Talavera's avatar Esteban Talavera
Browse files

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
parent 5826e469
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
+2 −2
Original line number Diff line number Diff line
@@ -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;
                    }