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

Commit 09ba4a4b authored by Michael Kwan's avatar Michael Kwan Committed by android-build-merger
Browse files

Ensure preference icon is returned when inflated from XML even if it has not been displayed yet.

am: f049e24c

Change-Id: Iab0a315f916fe7da2b2a523f364be5a6842aadbd
parents 4bb151c2 f049e24c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -719,6 +719,9 @@ public class Preference implements Comparable<Preference> {
     * @see #setIcon(Drawable)
     */
    public Drawable getIcon() {
        if (mIcon == null && mIconResId != 0) {
            mIcon = getContext().getDrawable(mIconResId);
        }
        return mIcon;
    }