Check for isAttachedToWindow before dispatching touch event
Otherwise we get an IllegalStateException Fixes: 380318615 Test: repos in production Flag: EXEMPT bugfix Change-Id: Id72b76ab288f40ee50ba8485d4b0636c525e22e3
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user