From a10d1aa6c790810990a09f5dfa616075fe198eed Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Tue, 21 Aug 2012 09:49:53 -0700 Subject: [PATCH] Multiprocess activity should be allowed to run on current user Multiprocess flag should override singleton checks. This allows ChooserActivity to run in the process/user that launched it. Wallpaper chooser from Launcher now works for secondary users. Change-Id: I17a99278ed2a6d2491c3016a549134a85bc2af00 --- services/java/com/android/server/am/ActivityStack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 1e0827f8b9db..ccea41aacc25 100755 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -3014,8 +3014,8 @@ final class ActivityStack { // Collect information about the target of the Intent. ActivityInfo aInfo = resolveActivity(intent, resolvedType, startFlags, profileFile, profileFd, userId); - if (aInfo != null && mService.isSingleton(aInfo.processName, aInfo.applicationInfo, - null, 0)) { + if (aInfo != null && (aInfo.flags & ActivityInfo.FLAG_MULTIPROCESS) == 0 + && mService.isSingleton(aInfo.processName, aInfo.applicationInfo, null, 0)) { userId = 0; } aInfo = mService.getActivityInfoForUser(aInfo, userId); -- 2.11.0