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

Commit 27d9bdfb 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 am: e44128f0

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

Change-Id: If1a9387932316ff3b4addea1075d8d69853d38dc
parents 2c3f21ad e44128f0
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) {