Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e44128f0 authored by ykhung's avatar ykhung Committed by Automerger Merge Worker
Browse files

Fix the icon flash issue cause from the shared drawable icon am: a3b89868

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15802168

Change-Id: I4b3e87e071a2fec6ace88afe1336be08e77c4075
parents 05727f20 a3b89868
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public class BatteryDiffEntry {
    /** Gets the app icon {@link Drawable} for this entry. */
    public Drawable getAppIcon() {
        loadLabelAndIcon();
        return mAppIcon;
        return mAppIcon.getConstantState().newDrawable();
    }

    /** Gets the app icon id for this entry. */
@@ -348,8 +348,8 @@ public class BatteryDiffEntry {

    private Drawable getBadgeIconForUser(Drawable icon) {
        final int userId = UserHandle.getUserId((int) mBatteryHistEntry.mUid);
        final UserHandle userHandle = new UserHandle(userId);
        return mUserManager.getBadgedIconForUser(icon, userHandle);
        return userId == UserHandle.USER_OWNER ? icon :
            mUserManager.getBadgedIconForUser(icon, new UserHandle(userId));
    }

    private static boolean isSystemUid(int uid) {