Changed output of get-main-user.
It will be just the user id when the device supports it, and "None" when it doesn't. Test: adb shell cmd user get-main-user Fixes: 271295369 Change-Id: I1d4ad4765cddade369ce1d7ce515fe5907d84932
This commit is contained in:
@@ -530,10 +530,10 @@ public class UserManagerServiceShellCommand extends ShellCommand {
|
||||
PrintWriter pw = getOutPrintWriter();
|
||||
final int mainUserId = mService.getMainUserId();
|
||||
if (mainUserId == UserHandle.USER_NULL) {
|
||||
pw.println("Couldn't get main user.");
|
||||
pw.println("None");
|
||||
return 1;
|
||||
}
|
||||
pw.println("Main user id: " + mainUserId);
|
||||
pw.println(mainUserId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user