Makes PlatformViewsController view to use tracked event's action & pointer count (flutter/engine#47424)

related issue https://github.com/flutter/flutter/issues/111268,
https://github.com/flutter/flutter/issues/106190

### Motivation:
- At https://github.com/flutter/flutter/issues/111268, we found that
Android PlatformView scrolls slowly after #34182 commit

### Modification:
- Makes `PlatformViewsController` view to use `tracked event`'s action &
pointer count

### Result:
- Now PlatformView scrolls not slowly
- Close https://github.com/flutter/flutter/issues/111268,
https://github.com/flutter/flutter/issues/106190


- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

Co-authored-by: John McCutchan <john@johnmccutchan.com>
This commit is contained in:
Code Otaku
2023-12-19 13:41:02 +09:00
committed by GitHub
parent 86415126ca
commit 7f0343f6fc
2 changed files with 4 additions and 4 deletions

View File

@@ -690,8 +690,8 @@ public class PlatformViewsController implements PlatformViewsAccessibilityDelega
return MotionEvent.obtain(
trackedEvent.getDownTime(),
trackedEvent.getEventTime(),
touch.action,
touch.pointerCount,
trackedEvent.getAction(),
trackedEvent.getPointerCount(),
pointerProperties,
pointerCoords,
trackedEvent.getMetaState(),

View File

@@ -356,8 +356,8 @@ public class PlatformViewsControllerTest {
frameWorkTouch,
false // usingVirtualDisplays
);
assertEquals(resolvedEvent.getAction(), frameWorkTouch.action);
assertNotEquals(resolvedEvent.getAction(), original.getAction());
assertEquals(resolvedEvent.getAction(), original.getAction());
assertNotEquals(resolvedEvent.getAction(), frameWorkTouch.action);
}
@Ignore