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

Commit 7e68efb0 authored by Romain Guy's avatar Romain Guy
Browse files

Non-opaque views with fading edges cannot be marked dirty opaque.

Bug #3325084

Change-Id: I80b7653daa2ae3cc6d81da1063911aa4cb69e8f4
parent a174d7a0
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -3392,7 +3392,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                        child.getAnimation() == null;
                // Mark the child as dirty, using the appropriate flag
                // Make sure we do not set both flags at the same time
                final int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;
                int opaqueFlag = isOpaque ? DIRTY_OPAQUE : DIRTY;

                final int[] location = attachInfo.mInvalidateChildLocation;
                location[CHILD_LEFT_INDEX] = child.mLeft;
@@ -3423,9 +3423,15 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager

                    // If the parent is dirty opaque or not dirty, mark it dirty with the opaque
                    // flag coming from the child that initiated the invalidate
                    if (view != null && (view.mPrivateFlags & DIRTY_MASK) != DIRTY) {
                    if (view != null) {
                        if ((view.mViewFlags & FADING_EDGE_MASK) != 0 &&
                                view.getSolidColor() == 0 && !view.isOpaque()) {
                            opaqueFlag = DIRTY;
                        }
                        if ((view.mPrivateFlags & DIRTY_MASK) != DIRTY) {
                            view.mPrivateFlags = (view.mPrivateFlags & ~DIRTY_MASK) | opaqueFlag;
                        }
                    }

                    parent = parent.invalidateChildInParent(location, dirty);
                    if (view != null) {