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

Commit b8c9732d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Delete TouchState::source" into udc-qpr-dev am: 5cf5ea19 am: b5195e31

parents b946e3df b5195e31
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -2257,7 +2257,6 @@ std::vector<InputTarget> InputDispatcher::findTouchedWindowTargetsLocked(
        const bool anotherDeviceIsActive =
        const bool anotherDeviceIsActive =
                oldActiveDevices.count(entry.deviceId) == 0 && !oldActiveDevices.empty();
                oldActiveDevices.count(entry.deviceId) == 0 && !oldActiveDevices.empty();
        switchedDevice |= anotherDeviceIsActive;
        switchedDevice |= anotherDeviceIsActive;
        switchedDevice |= oldState->source != entry.source;
    }
    }


    const bool isHoverAction = (maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE ||
    const bool isHoverAction = (maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE ||
@@ -2287,7 +2286,6 @@ std::vector<InputTarget> InputDispatcher::findTouchedWindowTargetsLocked(
    if (newGesture) {
    if (newGesture) {
        // If a new gesture is starting, clear the touch state completely.
        // If a new gesture is starting, clear the touch state completely.
        tempTouchState.reset();
        tempTouchState.reset();
        tempTouchState.source = entry.source;
        isSplit = false;
        isSplit = false;
    } else if (switchedDevice && maskedAction == AMOTION_EVENT_ACTION_MOVE) {
    } else if (switchedDevice && maskedAction == AMOTION_EVENT_ACTION_MOVE) {
        ALOGI("Dropping move event because a pointer for a different device is already active "
        ALOGI("Dropping move event because a pointer for a different device is already active "
@@ -2694,7 +2692,6 @@ std::vector<InputTarget> InputDispatcher::findTouchedWindowTargetsLocked(
        }
        }
        if (maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER ||
        if (maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER ||
            maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE) {
            maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE) {
            tempTouchState.source = entry.source;
        }
        }
    } else if (maskedAction == AMOTION_EVENT_ACTION_UP) {
    } else if (maskedAction == AMOTION_EVENT_ACTION_UP) {
        // Pointer went up.
        // Pointer went up.
+0 −1
Original line number Original line Diff line number Diff line
@@ -277,7 +277,6 @@ void TouchState::removeAllPointersForDevice(int32_t removedDeviceId) {


std::string TouchState::dump() const {
std::string TouchState::dump() const {
    std::string out;
    std::string out;
    out += StringPrintf("source=%s\n", inputEventSourceToString(source).c_str());
    if (!windows.empty()) {
    if (!windows.empty()) {
        out += "  Windows:\n";
        out += "  Windows:\n";
        for (size_t i = 0; i < windows.size(); i++) {
        for (size_t i = 0; i < windows.size(); i++) {
+0 −3
Original line number Original line Diff line number Diff line
@@ -29,9 +29,6 @@ class WindowInfoHandle;
namespace inputdispatcher {
namespace inputdispatcher {


struct TouchState {
struct TouchState {
    // source of the device that is current down, others are rejected
    uint32_t source = 0;

    std::vector<TouchedWindow> windows;
    std::vector<TouchedWindow> windows;


    TouchState() = default;
    TouchState() = default;