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

Commit bb2cef6b authored by Ryan Mitchell's avatar Ryan Mitchell Committed by Nicholas Sauer
Browse files

Dump all users when `dumpsys overlay` is invoked

Currently bugreports are missing OMS settings for non-system users. This
change dumps overlay information for all users when the --user flag is
not provided and it fixes the --user flag not parsing the specified id
correctly.

Bug: 137796495
Bug: 136549878
bug: 140734485
Test: manual
Change-Id: I0d545253179b3545307b88b3151d11fd9e6cbd5b
(cherry picked from commit b7ef06ac)
parent fcb2ce15
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ public final class OverlayManagerService extends SystemService {
        @Override
        protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
            final DumpState dumpState = new DumpState();
            dumpState.setUserId(UserHandle.getUserId(Binder.getCallingUid()));
            dumpState.setUserId(UserHandle.USER_ALL);

            int opti = 0;
            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.");
                    return;
                } else if ("--user".equals(opt)) {
                    opti++;
                    if (opti >= args.length) {
                        pw.println("Error: user missing argument");
                        return;
                    }
                    try {
                        dumpState.setUserId(Integer.parseInt(args[opti]));
                        opti++;
                    } catch (NumberFormatException e) {
                        pw.println("Error: user argument is not a number: " + args[opti]);
                        return;