OSDN Git Service

Fix personal apps are not shown when tapping "personal" in activity chooser
authorTony Mak <tonymak@google.com>
Wed, 24 Feb 2016 20:26:24 +0000 (20:26 +0000)
committerTony Mak <tonymak@google.com>
Wed, 24 Feb 2016 20:26:24 +0000 (20:26 +0000)
It is introduced in ag/842541.
function isMatch return flage when Flag that are neither
MATCH_ENCRYPTION_AWARE and MATCH_ENCRYPTION_UNAWARE.

We should call updateFlagsForResolve before resolving any intent in order
to make sure the flag is set properly.

Bug: 26614039
Change-Id: I4da34a34cb515557d0f5948a4c9ec4da9bfeb3f4

services/core/java/com/android/server/pm/PackageManagerService.java

index 41077d0..3630e95 100644 (file)
@@ -5001,8 +5001,9 @@ public class PackageManagerService extends IPackageManager.Stub {
             // cross-profile app linking works only towards the parent.
             final UserInfo parent = getProfileParent(sourceUserId);
             synchronized(mPackages) {
+                int flags = updateFlagsForResolve(0, parent.id, intent);
                 CrossProfileDomainInfo xpDomainInfo = getCrossProfileDomainPreferredLpr(
-                        intent, resolvedType, 0, sourceUserId, parent.id);
+                        intent, resolvedType, flags, sourceUserId, parent.id);
                 return xpDomainInfo != null;
             }
         }