mirror of
https://github.com/flutter/flutter.git
synced 2026-01-29 23:02:44 +08:00
Android touch events include updates to multiple pointers, but each pointer data message sent from the embedder to the framework represents a single pointer. So the Android embedder will send multiple messages for each touch event, and the framework's AndroidViewController will reassemble the messages and forward the resulting event to the platform view. The AndroidViewController tracks the number of active pointers in its own local state. If that state is out of sync with the event handled by the Android embedder, then the AndroidViewController may send duplicate events to the platform view. This PR encodes the Android touch event's pointer count in the messages sent to the framework. This allows the AndroidViewController to reliably determine whether it has received all of the pointer messages that originated from an event. Fixes https://github.com/flutter/flutter/issues/176574