Commit 3b09919b authored by Min Deng's avatar Min Deng

Don't intercept onTouch event when flutter view is not attached.

修复同时点击两个按钮打开新页面时,导致返回时 flutter 点击事件处理故障的问题。
parent d6e1c919
...@@ -458,10 +458,6 @@ public class XFlutterView extends FrameLayout { ...@@ -458,10 +458,6 @@ public class XFlutterView extends FrameLayout {
*/ */
@Override @Override
public boolean onTouchEvent(@NonNull MotionEvent event) { public boolean onTouchEvent(@NonNull MotionEvent event) {
if (!isAttachedToFlutterEngine()) {
return super.onTouchEvent(event);
}
// TODO(abarth): This version check might not be effective in some // TODO(abarth): This version check might not be effective in some
// versions of Android that statically compile code and will be upset // versions of Android that statically compile code and will be upset
// at the lack of |requestUnbufferedDispatch|. Instead, we should factor // at the lack of |requestUnbufferedDispatch|. Instead, we should factor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment