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:
@@ -58,7 +58,7 @@ public class DefaultEmergencyPicker extends DefaultAppPickerFragment {
|
||||
final PackageInfo packageInfo =
|
||||
mPm.getPackageInfo(info.activityInfo.packageName, 0);
|
||||
final ApplicationInfo appInfo = packageInfo.applicationInfo;
|
||||
candidates.add(new DefaultAppInfo(context, mPm, appInfo));
|
||||
candidates.add(new DefaultAppInfo(context, mPm, mUserId, appInfo));
|
||||
// Get earliest installed system app.
|
||||
if (isSystemApp(appInfo) && (bestMatch == null ||
|
||||
bestMatch.firstInstallTime > packageInfo.firstInstallTime)) {
|
||||
|
Reference in New Issue
Block a user