From 2a764949c943681a4d25a17a0b203a0127a4a486 Mon Sep 17 00:00:00 2001 From: Kenny Guy Date: Wed, 2 Apr 2014 13:29:20 +0100 Subject: Rename related users to profiles. Rename the related user concept as profiles. When returning profiles of a user include the user as a profile of itself. Change-Id: Id5d4f29017b7ca6844632ce643f10331ad733e1d --- cmds/pm/src/com/android/commands/pm/Pm.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmds/pm') diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java index f415c85..5454b46 100644 --- a/cmds/pm/src/com/android/commands/pm/Pm.java +++ b/cmds/pm/src/com/android/commands/pm/Pm.java @@ -1033,18 +1033,18 @@ public final class Pm { public void runCreateUser() { String name; - int relatedUserId = -1; + int userId = -1; int flags = 0; String opt; while ((opt = nextOption()) != null) { - if ("--relatedTo".equals(opt)) { + if ("--profileOf".equals(opt)) { String optionData = nextOptionData(); if (optionData == null || !isNumber(optionData)) { System.err.println("Error: no USER_ID specified"); showUsage(); return; } else { - relatedUserId = Integer.parseInt(optionData); + userId = Integer.parseInt(optionData); } } else if ("--managed".equals(opt)) { flags |= UserInfo.FLAG_MANAGED_PROFILE; @@ -1062,14 +1062,14 @@ public final class Pm { name = arg; try { UserInfo info = null; - if (relatedUserId < 0) { + if (userId < 0) { info = mUm.createUser(name, flags); } else { if (Process.myUid() != 0) { System.err.println("Error: not running as root."); return; } - info = mUm.createRelatedUser(name, flags, relatedUserId); + info = mUm.createProfileForUser(name, flags, userId); } if (info != null) { System.out.println("Success: created user id " + info.id); -- cgit v1.1