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
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 1e0827f..ccea41a 100755
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3014,8 +3014,8 @@
         // 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);