Show account icons for managed profiles on Settings > Factory Reset

Fixing a bug where managed profile's accounts where shown without
the account icon.

Bug: 18555032
Change-Id: I5a1094e795b31a00599bc4df413573030693b436
This commit is contained in:
Zoltan Szatmary-Ban
2014-12-02 17:22:10 +00:00
parent 1dce16a61c
commit 546790c1ed

View File

@@ -232,7 +232,8 @@ public class MasterClear extends Fragment {
Drawable icon = null;
try {
if (desc.iconId != 0) {
Context authContext = context.createPackageContext(desc.packageName, 0);
Context authContext = context.createPackageContextAsUser(desc.packageName,
0, userHandle);
icon = context.getPackageManager().getUserBadgedIcon(
authContext.getDrawable(desc.iconId), userHandle);
}