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

Commit a3b9c46f authored by Nicholas Sauer's avatar Nicholas Sauer Committed by android-build-merger
Browse files

Merge "Dump all users when `dumpsys overlay` is invoked" into qt-qpr1-dev

am: e36d59ea

Change-Id: I357b99126cfa4eac585e87e72d46941270381be8
parents 32248f52 e36d59ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -751,7 +751,7 @@ public final class OverlayManagerService extends SystemService {
        @Override
        @Override
        protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            final DumpState dumpState = new DumpState();
            final DumpState dumpState = new DumpState();
            dumpState.setUserId(UserHandle.getUserId(Binder.getCallingUid()));
            dumpState.setUserId(UserHandle.USER_ALL);


            int opti = 0;
            int opti = 0;
            while (opti < args.length) {
            while (opti < args.length) {
@@ -771,13 +771,13 @@ public final class OverlayManagerService extends SystemService {
                    pw.println("  so the following are equivalent: mState, mstate, State, state.");
                    pw.println("  so the following are equivalent: mState, mstate, State, state.");
                    return;
                    return;
                } else if ("--user".equals(opt)) {
                } else if ("--user".equals(opt)) {
                    opti++;
                    if (opti >= args.length) {
                    if (opti >= args.length) {
                        pw.println("Error: user missing argument");
                        pw.println("Error: user missing argument");
                        return;
                        return;
                    }
                    }
                    try {
                    try {
                        dumpState.setUserId(Integer.parseInt(args[opti]));
                        dumpState.setUserId(Integer.parseInt(args[opti]));
                        opti++;
                    } catch (NumberFormatException e) {
                    } catch (NumberFormatException e) {
                        pw.println("Error: user argument is not a number: " + args[opti]);
                        pw.println("Error: user argument is not a number: " + args[opti]);
                        return;
                        return;