Loading cmds/appops/src/com/android/commands/appops/AppOpsCommand.java +2 −2 Original line number Diff line number Diff line Loading @@ -284,8 +284,8 @@ public class AppOpsCommand extends BaseCommand { userId = UserHandle.USER_ALL; } else if ("current".equals(userStr)) { userId = UserHandle.USER_CURRENT; } else if ("owner".equals(userStr)) { userId = UserHandle.USER_OWNER; } else if ("owner".equals(userStr) || "system".equals(userStr)) { userId = UserHandle.USER_SYSTEM; } else { userId = Integer.parseInt(nextArgRequired()); } Loading cmds/appwidget/src/com/android/commands/appwidget/AppWidget.java +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ public class AppWidget { private SetBindAppWidgetPermissionCommand parseSetGrantBindAppWidgetPermissionCommand( boolean granted) { String packageName = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; for (String argument; (argument = mTokenizer.nextArg()) != null;) { if (ARGUMENT_PACKAGE.equals(argument)) { packageName = argumentValueRequired(argument); Loading cmds/content/src/com/android/commands/content/Content.java +6 −6 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ public class Content { private InsertCommand parseInsertCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; ContentValues values = new ContentValues(); for (String argument; (argument = mTokenizer.nextArg()) != null;) { if (ARGUMENT_URI.equals(argument)) { Loading @@ -210,7 +210,7 @@ public class Content { private DeleteCommand parseDeleteCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String where = null; for (String argument; (argument = mTokenizer.nextArg())!= null;) { if (ARGUMENT_URI.equals(argument)) { Loading @@ -232,7 +232,7 @@ public class Content { private UpdateCommand parseUpdateCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String where = null; ContentValues values = new ContentValues(); for (String argument; (argument = mTokenizer.nextArg())!= null;) { Loading Loading @@ -261,7 +261,7 @@ public class Content { public CallCommand parseCallCommand() { String method = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String arg = null; Uri uri = null; ContentValues values = new ContentValues(); Loading Loading @@ -293,7 +293,7 @@ public class Content { private ReadCommand parseReadCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; for (String argument; (argument = mTokenizer.nextArg())!= null;) { if (ARGUMENT_URI.equals(argument)) { uri = Uri.parse(argumentValueRequired(argument)); Loading @@ -312,7 +312,7 @@ public class Content { public QueryCommand parseQueryCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String[] projection = null; String sort = null; String where = null; Loading cmds/dpm/src/com/android/commands/dpm/Dpm.java +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public final class Dpm extends BaseCommand { private static final String COMMAND_SET_PROFILE_OWNER = "set-profile-owner"; private IDevicePolicyManager mDevicePolicyManager; private int mUserId = UserHandle.USER_OWNER; private int mUserId = UserHandle.USER_SYSTEM; private ComponentName mComponent = null; @Override Loading cmds/settings/src/com/android/commands/settings/SettingsCmd.java +4 −3 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ public final class SettingsCmd { if (valid) { if (mUser < 0) { mUser = UserHandle.USER_OWNER; mUser = UserHandle.USER_SYSTEM; } try { Loading @@ -139,7 +139,7 @@ public final class SettingsCmd { IBinder token = new Binder(); try { ContentProviderHolder holder = activityManager.getContentProviderExternal( "settings", UserHandle.USER_OWNER, token); "settings", UserHandle.USER_SYSTEM, token); if (holder == null) { throw new IllegalStateException("Could not find settings provider"); } Loading Loading @@ -291,7 +291,8 @@ public final class SettingsCmd { System.err.println(" settings [--user NUM] delete namespace key"); System.err.println(" settings [--user NUM] list namespace"); System.err.println("\n'namespace' is one of {system, secure, global}, case-insensitive"); System.err.println("If '--user NUM' is not given, the operations are performed on the owner user."); System.err.println("If '--user NUM' is not given, the operations are performed on the" + "system user."); } public static String resolveCallingPackage() { Loading Loading
cmds/appops/src/com/android/commands/appops/AppOpsCommand.java +2 −2 Original line number Diff line number Diff line Loading @@ -284,8 +284,8 @@ public class AppOpsCommand extends BaseCommand { userId = UserHandle.USER_ALL; } else if ("current".equals(userStr)) { userId = UserHandle.USER_CURRENT; } else if ("owner".equals(userStr)) { userId = UserHandle.USER_OWNER; } else if ("owner".equals(userStr) || "system".equals(userStr)) { userId = UserHandle.USER_SYSTEM; } else { userId = Integer.parseInt(nextArgRequired()); } Loading
cmds/appwidget/src/com/android/commands/appwidget/AppWidget.java +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ public class AppWidget { private SetBindAppWidgetPermissionCommand parseSetGrantBindAppWidgetPermissionCommand( boolean granted) { String packageName = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; for (String argument; (argument = mTokenizer.nextArg()) != null;) { if (ARGUMENT_PACKAGE.equals(argument)) { packageName = argumentValueRequired(argument); Loading
cmds/content/src/com/android/commands/content/Content.java +6 −6 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ public class Content { private InsertCommand parseInsertCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; ContentValues values = new ContentValues(); for (String argument; (argument = mTokenizer.nextArg()) != null;) { if (ARGUMENT_URI.equals(argument)) { Loading @@ -210,7 +210,7 @@ public class Content { private DeleteCommand parseDeleteCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String where = null; for (String argument; (argument = mTokenizer.nextArg())!= null;) { if (ARGUMENT_URI.equals(argument)) { Loading @@ -232,7 +232,7 @@ public class Content { private UpdateCommand parseUpdateCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String where = null; ContentValues values = new ContentValues(); for (String argument; (argument = mTokenizer.nextArg())!= null;) { Loading Loading @@ -261,7 +261,7 @@ public class Content { public CallCommand parseCallCommand() { String method = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String arg = null; Uri uri = null; ContentValues values = new ContentValues(); Loading Loading @@ -293,7 +293,7 @@ public class Content { private ReadCommand parseReadCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; for (String argument; (argument = mTokenizer.nextArg())!= null;) { if (ARGUMENT_URI.equals(argument)) { uri = Uri.parse(argumentValueRequired(argument)); Loading @@ -312,7 +312,7 @@ public class Content { public QueryCommand parseQueryCommand() { Uri uri = null; int userId = UserHandle.USER_OWNER; int userId = UserHandle.USER_SYSTEM; String[] projection = null; String sort = null; String where = null; Loading
cmds/dpm/src/com/android/commands/dpm/Dpm.java +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ public final class Dpm extends BaseCommand { private static final String COMMAND_SET_PROFILE_OWNER = "set-profile-owner"; private IDevicePolicyManager mDevicePolicyManager; private int mUserId = UserHandle.USER_OWNER; private int mUserId = UserHandle.USER_SYSTEM; private ComponentName mComponent = null; @Override Loading
cmds/settings/src/com/android/commands/settings/SettingsCmd.java +4 −3 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ public final class SettingsCmd { if (valid) { if (mUser < 0) { mUser = UserHandle.USER_OWNER; mUser = UserHandle.USER_SYSTEM; } try { Loading @@ -139,7 +139,7 @@ public final class SettingsCmd { IBinder token = new Binder(); try { ContentProviderHolder holder = activityManager.getContentProviderExternal( "settings", UserHandle.USER_OWNER, token); "settings", UserHandle.USER_SYSTEM, token); if (holder == null) { throw new IllegalStateException("Could not find settings provider"); } Loading Loading @@ -291,7 +291,8 @@ public final class SettingsCmd { System.err.println(" settings [--user NUM] delete namespace key"); System.err.println(" settings [--user NUM] list namespace"); System.err.println("\n'namespace' is one of {system, secure, global}, case-insensitive"); System.err.println("If '--user NUM' is not given, the operations are performed on the owner user."); System.err.println("If '--user NUM' is not given, the operations are performed on the" + "system user."); } public static String resolveCallingPackage() { Loading