Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 167bc821 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 2995805 - splitMotionEvents behavior change

Changed the new split motion events behavior to match the enshrined
behavior. A return value of false from a target's dispatchTouchEvent
will not prevent the target from receiving further events in the
gesture unless it is the initial ACTION_DOWN event.

Change-Id: Ied8d531dfec7009a4124ed670b1700753c3f9caa
parent f5aafff4
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -1222,13 +1222,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                    uniqueTargetCount--;
                }

                final boolean childHandled = target.dispatchTouchEvent(targetEvent);
                handled |= childHandled;
                if (!childHandled) {
                    // Child doesn't want these events anymore, but we're still dispatching
                    // other split events to children.
                    targets.removeView(target);
                }
                handled |= target.dispatchTouchEvent(targetEvent);
            } finally {
                targetEvent.recycle();
            }