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

Commit 831c1a91 authored by Mihai Popa's avatar Mihai Popa
Browse files

Move ViewGroup#mChildren[Count] to dark-grey list

The CL moves mChildren and mChildrenCount in ViewGroup to the dark-grey
list of APIs, disabling access to them for apps targeting Q. Developers
should probably use ViewGroup#getChildCount() and ViewGroup#getChildAt()
which exist since public API 1.

Bug: 117521014
Bug: 117521406
Test: atest core/tests/coretests/src/android/view/
Change-Id: I14d3ebd1b16edc92cd7b370404b1f05cd304ab7d
parent a226524a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -541,11 +541,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
    private static final int CHILD_TOP_INDEX = 1;

    // Child views of this ViewGroup
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    private View[] mChildren;
    // Number of valid children in the mChildren array, the rest should be null or not
    // considered as children
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    private int mChildrenCount;

    // Whether layout calls are currently being suppressed, controlled by calls to