Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[android] Pass synthesized eventType to VirtualDisplay platform views and fix memory leak #19620

Merged
merged 4 commits into from
Jul 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ private MotionEvent toMotionEvent(float density, PlatformViewsChannel.PlatformVi
return MotionEvent.obtain(
trackedEvent.getDownTime(),
trackedEvent.getEventTime(),
trackedEvent.getAction(),
touch.action, // TODO (kaushikiska): https://github.com/flutter/flutter/issues/61169
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Offline discussion: the recommended fix is to leave the virtual display code path unchanged, and have a new toMotionEvent method for hybrid composition, which uses trackedEvent.getAction().

Also, we will need unit tests since the e2e test in https://github.com/flutter/flutter/tree/master/dev/integration_tests/android_views failed at capturing this issue. I will investigate this issue.

touch.pointerCount,
pointerProperties,
pointerCoords,
Expand Down