Start enforcing explicit intents for Context.bindService()
No longer prints a warning, now throws an exception.
Also fix a bug in UserManagerService that was causing an
exception while booting.
Change-Id: I3b43cfe08067da840b6850b9bed58664d36d34f1
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index fc98c4e..7f55464 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -234,9 +234,7 @@
}
void systemReady() {
- final Context context = ActivityThread.systemMain().getSystemContext();
- mUserPackageMonitor.register(context,
- null, UserHandle.ALL, false);
+ mUserPackageMonitor.register(mContext, null, UserHandle.ALL, false);
userForeground(UserHandle.USER_OWNER);
}
@@ -457,7 +455,7 @@
/**
* Enforces that only the system UID or root's UID or apps that have the
- * {@link android.Manifest.permission.MANAGE_USERS MANAGE_USERS}
+ * {@link android.Manifest.permission#MANAGE_USERS MANAGE_USERS}
* permission can make certain calls to the UserManager.
*
* @param message used as message if SecurityException is thrown
@@ -1046,7 +1044,7 @@
/**
* Removes a user and all data directories created for that user. This method should be called
* after the user's processes have been terminated.
- * @param id the user's id
+ * @param userHandle the user's id
*/
public boolean removeUser(int userHandle) {
checkManageUsersPermission("Only the system can remove users");