OSDN Git Service

Multiprocess activity should be allowed to run on current user
authorAmith Yamasani <yamasani@google.com>
Tue, 21 Aug 2012 16:49:53 +0000 (09:49 -0700)
committerAmith Yamasani <yamasani@google.com>
Tue, 21 Aug 2012 16:51:13 +0000 (09:51 -0700)
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

index 1e0827f..ccea41a 100755 (executable)
@@ -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);