Resolve based on the correct user's default browser

Bug 22509659

Change-Id: Iac75e7b40609bf2c81d266e0568fbfbeb71bb3aa
This commit is contained in:
Christopher Tate
2015-07-15 14:52:29 -07:00
parent 4e9c63cbe1
commit 7991f7813e

View File

@@ -4716,8 +4716,7 @@ public class PackageManagerService extends IPackageManager.Stub {
} else {
// Browser/generic handling case. If there's a default browser, go straight
// to that (but only if there is no other higher-priority match).
final String defaultBrowserPackageName = getDefaultBrowserPackageName(
UserHandle.myUserId());
final String defaultBrowserPackageName = getDefaultBrowserPackageName(userId);
int maxMatchPrio = 0;
ResolveInfo defaultBrowserMatch = null;
final int numCandidates = matchAllList.size();
@@ -9929,7 +9928,7 @@ public class PackageManagerService extends IPackageManager.Stub {
if (packageName != null) {
result |= updateIntentVerificationStatus(packageName,
PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS,
UserHandle.myUserId());
userId);
mDefaultPermissionPolicy.grantDefaultPermissionsToDefaultBrowserLPr(
packageName, userId);
}