Skip to content

Commit e6d3ccc

Browse files
committed
Print newly generated userId.
Bug: 7334718 Change-Id: Id4dc456b079bebbe9f2d7ea2a8343d2215f296dc
1 parent 38f8688 commit e6d3ccc

File tree

1 file changed

+4
-1
lines changed
  • cmds/pm/src/com/android/commands/pm

1 file changed

+4
-1
lines changed

cmds/pm/src/com/android/commands/pm/Pm.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,10 @@ public void runCreateUser() {
990990
}
991991
name = arg;
992992
try {
993-
if (mUm.createUser(name, 0) == null) {
993+
final UserInfo info = mUm.createUser(name, 0);
994+
if (info != null) {
995+
System.out.println("Success: created user id " + info.id);
996+
} else {
994997
System.err.println("Error: couldn't create User.");
995998
}
996999
} catch (RemoteException e) {

0 commit comments

Comments
 (0)