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

Commit 8c94bdb8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove redundant isSplit assignments" into main

parents 94b29e54 89c429fc
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -2412,7 +2412,7 @@ InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, const Motio
        tempTouchState = *oldState;
    }

    bool isSplit = shouldSplitTouch(entry.source);
    const bool isSplit = shouldSplitTouch(entry.source);

    const bool isHoverAction = (maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE ||
                                maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER ||
@@ -2425,11 +2425,6 @@ InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, const Motio
    const bool newGesture = isDown || maskedAction == AMOTION_EVENT_ACTION_SCROLL ||
            maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER ||
            maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE;
    const bool isFromMouse = isFromSource(entry.source, AINPUT_SOURCE_MOUSE);

    if (newGesture) {
        isSplit = false;
    }

    if (isDown && tempTouchState.hasHoveringPointers(entry.deviceId)) {
        // Compatibility behaviour: ACTION_DOWN causes HOVER_EXIT to get generated.
@@ -2472,8 +2467,6 @@ InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, const Motio
            return injectionError(InputEventInjectionResult::TARGET_MISMATCH);
        }

        isSplit = !isFromMouse;

        std::vector<sp<WindowInfoHandle>> newTouchedWindows =
                mWindowInfos.findTouchedSpyWindowsAt(displayId, x, y, isStylus, entry.deviceId,
                                                     mTouchStatesByDisplay);
@@ -2647,7 +2640,6 @@ InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime, const Motio
                                             targets);

                // Make a slippery entrance into the new window.
                isSplit = !isFromMouse;

                ftl::Flags<InputTarget::Flags> targetFlags;
                if (canReceiveForegroundTouches(*newTouchedWindowHandle->getInfo())) {