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

Commit 3a509994 authored by Jeff DeCew's avatar Jeff DeCew Committed by Mohammed Althaf T
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 7088043c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ public class LockIcon extends KeyguardAffordanceView {
        int iconRes = isAnim ? getThemedAnimationResId(lockAnimIndex) : getIconForState(newState);

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

        return mDrawableCache.get(iconRes);