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

Commit ca0608af authored by John Reck's avatar John Reck
Browse files

Fix setLayerType

 Bug: 15682142

 mLayerType/getLayerType() can modify the display list, so invalidate()
 is necessary

Change-Id: I1d323c1bd4356b31159b51d4299de099e53a0389
parent 29956069
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -13432,8 +13432,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        // Destroy any previous software drawing cache if needed
        if (mLayerType == LAYER_TYPE_SOFTWARE) {
            destroyDrawingCache();
            invalidateParentCaches();
            invalidate(true);
        }
        mLayerType = layerType;
@@ -13441,13 +13439,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        mLayerPaint = layerDisabled ? null : (paint == null ? new Paint() : paint);
        mRenderNode.setLayerPaint(mLayerPaint);
        if (mLayerType == LAYER_TYPE_SOFTWARE) {
            // LAYER_TYPE_SOFTWARE is handled by View:draw(), so need to invalidate()
        // draw() behaves differently if we are on a layer, so we need to
        // invalidate() here
        invalidateParentCaches();
        invalidate(true);
        } else {
            invalidateViewProperty(false, false);
        }
    }
    /**