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

Commit 607dc521 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Add user type to 'user list -v' output

Shows the user type in the verbose user list.

For convenient readability, the phrase 'android.os.usertype.' is
stripped from the output. So, e.g.,
type=android.os.usertype.full.GUEST
will appear as
type=full.GUEST

Test: adb shell cmd user list -v
Change-Id: I87b03b74c8ca2d83a609822597b3c80a178827be
parent 567fe7b4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5071,8 +5071,11 @@ public class UserManagerService extends IUserManager.Stub {
                            Binder.restoreCallingIdentity(ident);
                        }
                    }
                    pw.printf("%d: id=%d, name=%s, flags=%s%s%s%s%s%s%s%s%s\n", i, user.id,
                    pw.printf("%d: id=%d, name=%s, type=%s, flags=%s%s%s%s%s%s%s%s%s\n",
                            i,
                            user.id,
                            user.name,
                            user.userType.replace("android.os.usertype.", ""),
                            UserInfo.flagsToString(user.flags),
                            hasParent ? " (parentId=" + user.profileGroupId + ")" : "",
                            running ? " (running)" : "",