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 DefaultPhonePicker extends DefaultAppPickerFragment {
|
||||
final Context context = getContext();
|
||||
for (String packageName : dialerPackages) {
|
||||
try {
|
||||
candidates.add(new DefaultAppInfo(context, mPm,
|
||||
candidates.add(new DefaultAppInfo(context, mPm, mUserId,
|
||||
mPm.getApplicationInfoAsUser(packageName, 0, mUserId)));
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
// Skip unknown packages.
|
||||
|
Reference in New Issue
Block a user