Merge "Check for isAttachedToWindow before dispatching touch event" into main

This commit is contained in:
Jon Miranda
2025-03-11 13:38:38 -07:00
committed by Android (Google) Code Review
@@ -194,6 +194,7 @@ public class NearestTouchFrame extends FrameLayout {
event.offsetLocation(mTouchingChild.getWidth() / 2 - x,
mTouchingChild.getHeight() / 2 - y);
return mTouchingChild.getVisibility() == VISIBLE
&& mTouchingChild.isAttachedToWindow()
&& mTouchingChild.dispatchTouchEvent(event);
}
}