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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user