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

Commit 0adca266 authored by Adam Powell's avatar Adam Powell
Browse files

Restrict View#mAttachInfo

There are some fun things you can do by reflecting on this, but most
are either handled via existing public API or result in framework
maintenance issues. Restrict reflection as of targetSdk > P.

Change-Id: I204574d8185073cd86b56678aa0b6d9a66551a4a
Fixes: 123768936
parent 38ce8c21
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -4020,8 +4020,24 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    /**
     * {@hide}
     *
     * Not available for general use. If you need help, hang up and then dial one of the following
     * public APIs:
     *
     * @see #isAttachedToWindow() for current attach state
     * @see #onAttachedToWindow() for subclasses performing work when becoming attached
     * @see #onDetachedFromWindow() for subclasses performing work when becoming detached
     * @see OnAttachStateChangeListener for other code performing work on attach/detach
     * @see #getHandler() for posting messages to this view's UI thread/looper
     * @see #getParent() for interacting with the parent chain
     * @see #getWindowToken() for the current window token
     * @see #getRootView() for the view at the root of the attached hierarchy
     * @see #getDisplay() for the Display this view is presented on
     * @see #getRootWindowInsets() for the current insets applied to the whole attached window
     * @see #hasWindowFocus() for whether the attached window is currently focused
     * @see #getWindowVisibility() for checking the visibility of the attached window
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    AttachInfo mAttachInfo;
    /**
@@ -28066,18 +28082,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
         */
        View mViewRequestingLayout;
        /**
         * Used to track views that need (at least) a partial relayout at their current size
         * during the next traversal.
         */
        List<View> mPartialLayoutViews = new ArrayList<>();
        /**
         * Swapped with mPartialLayoutViews during layout to avoid concurrent
         * modification. Lazily assigned during ViewRootImpl layout.
         */
        List<View> mEmptyPartialLayoutViews;
        /**
         * Used to track the identity of the current drag operation.
         */