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

Commit bc11d08d authored by Felipe Leme's avatar Felipe Leme Committed by Automerger Merge Worker
Browse files

Merge "Improvements on UserManagerService ShellCommand implementation (4/4)."...

Merge "Improvements on UserManagerService ShellCommand implementation (4/4)." into tm-dev am: f82c20ad

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17124768



Change-Id: Iaa6b7f7cd05be93e753e0205012ae32e11c467a4
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a3f8fa91 f82c20ad
Loading
Loading
Loading
Loading
+156 −156
Original line number Original line Diff line number Diff line
@@ -5413,6 +5413,8 @@ public class UserManagerService extends IUserManager.Stub {
        (new Shell()).exec(this, in, out, err, args, callback, resultReceiver);
        (new Shell()).exec(this, in, out, err, args, callback, resultReceiver);
    }
    }


    private final class Shell extends ShellCommand {

        private static final String PREFIX_HELP_COMMAND = "  ";
        private static final String PREFIX_HELP_COMMAND = "  ";
        private static final String PREFIX_HELP_DESCRIPTION = "    ";
        private static final String PREFIX_HELP_DESCRIPTION = "    ";
        private static final String PREFIX_HELP_DESCRIPTION_EXTRA_LINES = "      ";
        private static final String PREFIX_HELP_DESCRIPTION_EXTRA_LINES = "      ";
@@ -5428,8 +5430,6 @@ public class UserManagerService extends IUserManager.Stub {
        private static final String ARG_CRITICAL_ONLY = "--critical-only";
        private static final String ARG_CRITICAL_ONLY = "--critical-only";
        private static final String ARG_MODE = "--mode";
        private static final String ARG_MODE = "--mode";


    private final class Shell extends ShellCommand {

        @Override
        @Override
        public void onHelp() {
        public void onHelp() {
            final PrintWriter pw = getOutPrintWriter();
            final PrintWriter pw = getOutPrintWriter();
@@ -5498,7 +5498,7 @@ public class UserManagerService extends IUserManager.Stub {
            }
            }
            final IActivityManager am = ActivityManager.getService();
            final IActivityManager am = ActivityManager.getService();
            final List<UserInfo> users = getUsers(/* excludePartial= */ !all,
            final List<UserInfo> users = getUsers(/* excludePartial= */ !all,
                /* excludingDying=*/ false, /* excludePreCreated= */ !all);
                    /* excludeDying= */ false, /* excludePreCreated= */ !all);
            if (users == null) {
            if (users == null) {
                pw.println("Error: couldn't get users");
                pw.println("Error: couldn't get users");
                return 1;
                return 1;