Get app info with correct user id.

- when querying app info from package manager, we should use the methods
that takes the user id so that it will work properly with managed
profile.

Change-Id: Ifc84d3a29aaf7b2c1acfa096596a53f1715cc908
Fixes: 117222623
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2018-10-11 16:37:32 -07:00
parent b3eaf62562
commit b9ff5892ca
12 changed files with 65 additions and 23 deletions

View File

@@ -30,7 +30,8 @@ public class DefaultBrowserShortcutPreferenceController
@Override
protected boolean hasAppCapability() {
return DefaultBrowserPreferenceController.hasBrowserPreference(mPackageName, mContext);
return DefaultBrowserPreferenceController
.hasBrowserPreference(mPackageName, mContext, UserHandle.myUserId());
}
@Override