Fix app icons on some Settings screens
App icons appeared as the default icon and sometimes without the corp badge on Data Usage and Battery screens for applications that were only installed for the managed profile. This CL fixes the issue. Bug:16705204 Change-Id: I778d36554feb19f28f3cb9321a291cab3d3e17bb
This commit is contained in:
@@ -54,7 +54,7 @@ public class PowerUsageSummary extends PreferenceFragment {
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
private static final String TAG = "PowerUsageSummary";
|
||||
static final String TAG = "PowerUsageSummary";
|
||||
|
||||
private static final String KEY_APP_LIST = "app_list";
|
||||
|
||||
@@ -293,7 +293,7 @@ public class PowerUsageSummary extends PreferenceFragment {
|
||||
}
|
||||
final UserHandle userHandle = new UserHandle(UserHandle.getUserId(sipper.getUid()));
|
||||
final BatteryEntry entry = new BatteryEntry(getActivity(), mHandler, mUm, sipper);
|
||||
final Drawable badgedIcon = mUm.getBadgedDrawableForUser(entry.getIcon(),
|
||||
final Drawable badgedIcon = mUm.getBadgedIconForUser(entry.getIcon(),
|
||||
userHandle);
|
||||
final CharSequence contentDescription = mUm.getBadgedLabelForUser(entry.getLabel(),
|
||||
userHandle);
|
||||
@@ -337,7 +337,7 @@ public class PowerUsageSummary extends PreferenceFragment {
|
||||
if (pgp != null) {
|
||||
final int userId = UserHandle.getUserId(entry.sipper.getUid());
|
||||
final UserHandle userHandle = new UserHandle(userId);
|
||||
pgp.setIcon(mUm.getBadgedDrawableForUser(entry.getIcon(), userHandle));
|
||||
pgp.setIcon(mUm.getBadgedIconForUser(entry.getIcon(), userHandle));
|
||||
pgp.setTitle(entry.name);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user