Explicitly specify current user everywhere home is started.
Change-Id: I58d86136de7f9cef1eaf72793d0e200b852d7355
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 448044a..90e8d73 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2392,17 +2392,8 @@
String resultWho, int requestCode, int startFlags,
String profileFile, ParcelFileDescriptor profileFd, Bundle options, int userId) {
enforceNotIsolatedCaller("startActivity");
- if (userId != UserHandle.getCallingUserId()) {
- userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
- false, true, "startActivity", null);
- } else {
- if (intent.getCategories() != null
- && intent.getCategories().contains(Intent.CATEGORY_HOME)) {
- // Requesting home, set the identity to the current user
- // HACK!
- userId = mCurrentUserId;
- }
- }
+ userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+ false, true, "startActivity", null);
return mMainStack.startActivityMayWait(caller, -1, intent, resolvedType,
resultTo, resultWho, requestCode, startFlags, profileFile, profileFd,
null, null, options, userId);