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

Commit d28665b3 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Use correct API for badging" into lmp-dev

parents b3fdbac0 fdf169cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1693,7 +1693,7 @@ final class ApplicationPackageManager extends PackageManager {
        if (dr == null) {
            dr = itemInfo.loadDefaultIcon(this);
        }
        return getUserBadgedDrawableForDensity(dr, new UserHandle(mContext.getUserId()), null, 0);
        return getUserBadgedIcon(dr, new UserHandle(mContext.getUserId()));
    }

    private Drawable getBadgedDrawable(Drawable drawable, Drawable badgeDrawable,
+1 −2
Original line number Diff line number Diff line
@@ -203,8 +203,7 @@ public class RecentTasksLoader implements View.OnTouchListener {
        Drawable icon = getFullResIcon(td.resolveInfo, pm);
        if (td.userId != UserHandle.myUserId()) {
            // Need to badge the icon
            icon = mContext.getPackageManager().getUserBadgedDrawableForDensity(icon,
                    new UserHandle(td.userId), null, 0);
            icon = mContext.getPackageManager().getUserBadgedIcon(icon, new UserHandle(td.userId));
        }
        if (DEBUG) Log.v(TAG, "Loaded bitmap for task "
                + td + ": " + thumbnail);
+1 −1
Original line number Diff line number Diff line
@@ -356,7 +356,7 @@ public class SystemServicesProxy {
     */
    public Drawable getBadgedIcon(Drawable icon, int userId) {
        if (userId != UserHandle.myUserId()) {
            icon = mPm.getUserBadgedDrawableForDensity(icon, new UserHandle(userId), null, 0);
            icon = mPm.getUserBadgedIcon(icon, new UserHandle(userId));
        }
        return icon;
    }