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

Commit bf881172 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix LockIcon to use Context.getDrawable(int)

Using Resources.getDrawable(int) is deprecated because it lacks theme information,
and I was seeing a crash because theme attributes were not fully resolved.

Test: manual
Change-Id: Idf1b13e16362c2e06227813f4298091ba4406bd5
parent faeec12c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -168,7 +168,7 @@ public class LockIcon extends KeyguardAffordanceView {
        int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(newState);
        int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(newState);


        if (!mDrawableCache.contains(iconRes)) {
        if (!mDrawableCache.contains(iconRes)) {
            mDrawableCache.put(iconRes, getResources().getDrawable(iconRes));
            mDrawableCache.put(iconRes, getContext().getDrawable(iconRes));
        }
        }


        return mDrawableCache.get(iconRes);
        return mDrawableCache.get(iconRes);