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

Commit 4ba27796 authored by Jakub Gielzak's avatar Jakub Gielzak
Browse files

Restrict reflection access to View methods

Restricted reflection access to:
- dispatchAttachedToWindow
- dispatchDetachedFromWindow

Those should not be used directly as it violates internal code
guarantees. Instead Views need to be actually attached to the window.

Bug: 123769352, 123769370
Test: n/a

Change-Id: I0006bc99a2d10747e931e944caee21932c4642dd
parent 80ced71a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19413,7 +19413,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @param info the {@link android.view.View.AttachInfo} to associated with
     *        this view
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    void dispatchAttachedToWindow(AttachInfo info, int visibility) {
        mAttachInfo = info;
        if (mOverlay != null) {
@@ -19479,7 +19479,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        notifyAppearedOrDisappearedForContentCaptureIfNeeded(true);
    }
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
    void dispatchDetachedFromWindow() {
        AttachInfo info = mAttachInfo;
        if (info != null) {