Fix user id is not used correctly when fetching app info
FIXES: 73994288 Test: m -j RunSettingsRoboTest Test: Install an app in work profile, set it to be restricted, observe that the app is rendered properly in restricted app list Change-Id: Ic8a79eb3d0a675f9d1cae3125e8006739e492966
This commit is contained in:
@@ -131,8 +131,8 @@ public class RestrictedAppDetails extends DashboardFragment {
|
||||
final CheckBoxPreference checkBoxPreference = new AppCheckBoxPreference(context);
|
||||
final AppInfo appInfo = mAppInfos.get(i);
|
||||
try {
|
||||
final ApplicationInfo applicationInfo = mPackageManager.getApplicationInfo(
|
||||
appInfo.packageName, 0 /* flags */);
|
||||
final ApplicationInfo applicationInfo = mPackageManager.getApplicationInfoAsUser(
|
||||
appInfo.packageName, 0 /* flags */, UserHandle.getUserId(appInfo.uid));
|
||||
checkBoxPreference.setChecked(true);
|
||||
checkBoxPreference.setTitle(mPackageManager.getApplicationLabel(applicationInfo));
|
||||
checkBoxPreference.setIcon(
|
||||
|
Reference in New Issue
Block a user