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

Commit f1317857 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Quick fix issue #17514851: dumpsys package <package-name> includes...

...irrelevant install state at the end

Quick and dirty impl just doesn't print any of that data when filtering
by package name.  In the future that part of the dump should be smarter
to know how to filter by package name.  (Probably also moved to a place
earlier in the dump, so the key information -- the overall package
data -- is still at the end.)

Change-Id: I094f7c2f25401438a68a6aa00d10b19c19eb7c7d
parent 2d02b204
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -12118,14 +12118,14 @@ public class PackageManagerService extends IPackageManager.Stub {
                dumpState.setDump(DumpState.DUMP_VERSION);
            } else if ("k".equals(cmd) || "keysets".equals(cmd)) {
                dumpState.setDump(DumpState.DUMP_KEYSETS);
            } else if ("installs".equals(cmd)) {
                dumpState.setDump(DumpState.DUMP_INSTALLS);
            } else if ("write".equals(cmd)) {
                synchronized (mPackages) {
                    mSettings.writeLPr();
                    pw.println("Settings written.");
                    return;
                }
            } else if ("installs".equals(cmd)) {
                dumpState.setDump(DumpState.DUMP_INSTALLS);
            }
        }
@@ -12357,7 +12357,9 @@ public class PackageManagerService extends IPackageManager.Stub {
                mSettings.dumpSharedUsersLPr(pw, packageName, dumpState);
            }
            if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS)) {
            if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS) && packageName == null) {
                // XXX should handle packageName != null by dumping only install data that
                // the given package is involved with.
                if (dumpState.onTitlePrinted()) pw.println();
                mInstallerService.dump(new IndentingPrintWriter(pw, "  ", 120));
            }