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
diff --git a/src/com/android/settings/applications/RunningState.java b/src/com/android/settings/applications/RunningState.java
index 4b58729..0b225b6 100644
--- a/src/com/android/settings/applications/RunningState.java
+++ b/src/com/android/settings/applications/RunningState.java
@@ -327,7 +327,9 @@
public Drawable loadIcon(Context context, RunningState state) {
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;
}