Clean up USER_OWNER reference.
Bug: 19913735
Change-Id: I441672b360fa0fff5453f72c88f9577b5cc8eecf
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index ed7a2a3..924df1b 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -4702,7 +4702,7 @@
private static boolean copyNeeded(int flags, Package p,
PackageUserState state, Bundle metaData, int userId) {
- if (userId != UserHandle.USER_OWNER) {
+ if (userId != UserHandle.USER_SYSTEM) {
// We always need to copy for other users, since we need
// to fix up the uid.
return true;
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index b293e2a..b3f03c3 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -213,7 +213,7 @@
@Override
public void onReceive(Context context, Intent intent) {
// External apps can't coexist with multi-user, so scan owner
- handlePackageEvent(intent, UserHandle.USER_OWNER);
+ handlePackageEvent(intent, UserHandle.USER_SYSTEM);
}
};
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index f3ea1c4..b6cd477 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -16022,7 +16022,7 @@
"Call does not support special user #" + targetUserId);
}
// Check shell permission
- if (callingUid == Process.SHELL_UID && targetUserId >= UserHandle.USER_OWNER) {
+ if (callingUid == Process.SHELL_UID && targetUserId >= UserHandle.USER_SYSTEM) {
if (mUserManager.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES,
targetUserId)) {
throw new SecurityException("Shell does not have permission to access user "
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index c998c2c..292aff9 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -790,7 +790,7 @@
for (AccountAndUser account : accounts) {
// If userId is specified, do not sync accounts of other users
- if (userId >= UserHandle.USER_OWNER && account.userId >= UserHandle.USER_OWNER
+ if (userId >= UserHandle.USER_SYSTEM && account.userId >= UserHandle.USER_SYSTEM
&& userId != account.userId) {
continue;
}
diff --git a/services/core/java/com/android/server/location/LocationBlacklist.java b/services/core/java/com/android/server/location/LocationBlacklist.java
index 6f22689..3f3f828 100644
--- a/services/core/java/com/android/server/location/LocationBlacklist.java
+++ b/services/core/java/com/android/server/location/LocationBlacklist.java
@@ -50,7 +50,7 @@
private String[] mWhitelist = new String[0];
private String[] mBlacklist = new String[0];
- private int mCurrentUserId = UserHandle.USER_OWNER;
+ private int mCurrentUserId = UserHandle.USER_SYSTEM;
public LocationBlacklist(Context context, Handler handler) {
super(handler);