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

This commit is contained in:
Jon Miranda authored and Android (Google) Code Review committed 2025-03-11 13:38:38 -07:00
commit ccbc78735f
1 file changed
+1
@@ -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);
}
}