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

Commit 5c1462b4 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Ignore non-pointer events in LetterboxScrollProcessor

Non-pointer events don't correspond to any location on the screen, so they can't be used to scroll the letterbox.

Bug: 380510280
Change-Id: Ifb5cf30458595a94fb2969e0ba9b24d324fa1407
Flag: com.android.window.flags.scrolling_from_letterbox
Test: Manual
parent 788a1649
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -78,6 +78,11 @@ public class LetterboxScrollProcessor {
    @Nullable
    @VisibleForTesting(visibility = PACKAGE)
    public List<MotionEvent> processMotionEvent(@NonNull MotionEvent motionEvent) {
        if (!motionEvent.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) {
            // This is a non-pointer event that doesn't correspond to any location on the screen.
            // Ignore it.
            return null;
        }
        mProcessedEvents.clear();
        final Rect appBounds = getAppBounds();