Badge items in Settings > Apps > Running correctly

That is, add a badge if the item belongs to a managed profile and
do not add if it belongs to the primary.

Bug: 18235061
Change-Id: Ice599b30cd2827180c21c8d0601af7f30b46e94b
This commit is contained in:
Zoltan Szatmary-Ban
2014-12-15 14:28:39 +00:00
parent 3d51b61f6c
commit 903fa3f8eb

View File

@@ -327,7 +327,9 @@ public class RunningState {
public Drawable loadIcon(Context context, RunningState state) { public Drawable loadIcon(Context context, RunningState state) {
if (mPackageInfo != null) { if (mPackageInfo != null) {
return mPackageInfo.loadIcon(state.mPm); Drawable unbadgedIcon = mPackageInfo.loadUnbadgedIcon(state.mPm);
Drawable icon = state.mPm.getUserBadgedIcon(unbadgedIcon, new UserHandle(mUserId));
return icon;
} }
return null; return null;
} }