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

Commit 79a63f7d authored by Romain Guy's avatar Romain Guy
Browse files

Make sure that a drawable replacing a layer in a LayerDrawable gets a callback.

Change-Id: Iefac7d280b3c16e05f45688da655e17e21a3098b
parent 26723fc8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
     */
    public boolean setDrawableByLayerId(int id, Drawable drawable) {
        final ChildDrawable[] layers = mLayerState.mChildren;
        if (drawable != null) drawable.setCallback(mCallback);
        
        for (int i = mLayerState.mNum - 1; i >= 0; i--) {
            if (layers[i].mId == id) {