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

Commit 28221119 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Add check for no children in VIew hosting virtual view tree."

parents 49cc3d98 311a63af
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -13055,11 +13055,6 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            ViewDebug.trace(this, ViewDebug.HierarchyTraceType.REQUEST_LAYOUT);
        }
        if (getAccessibilityNodeProvider() != null) {
            throw new IllegalStateException("Views with AccessibilityNodeProvider"
                    + " can't have children.");
        }
        mPrivateFlags |= FORCE_LAYOUT;
        mPrivateFlags |= INVALIDATED;
+9 −0
Original line number Diff line number Diff line
@@ -2669,6 +2669,15 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        return child.draw(canvas, this, drawingTime);
    }

    @Override
    public void requestLayout() {
        if (mChildrenCount > 0 && getAccessibilityNodeProvider() != null) {
            throw new IllegalStateException("Views with AccessibilityNodeProvider"
                    + " can't have children.");
        }
        super.requestLayout();
    }

    /**
     * 
     * @param enabled True if children should be drawn with layers, false otherwise.