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

Commit f6ae4b89 authored by Romain Guy's avatar Romain Guy
Browse files

Reset stored background resource when setting a bg color

This sequence of operations would prevent the background from
changing:

setBackgroundResource(R.something)
setBackgroundColor(aColor)
setBackgroundResource(R.something)

The last call would be no-oped.

Change-Id: I436a33599c88e35f6f36bdd63e9c256c9219e052
parent f6e7b208
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14465,6 +14465,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        if (mBackground instanceof ColorDrawable) {
            ((ColorDrawable) mBackground.mutate()).setColor(color);
            computeOpaqueFlags();
            mBackgroundResource = 0;
        } else {
            setBackground(new ColorDrawable(color));
        }