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

Commit 8345c21e authored by Minche Li's avatar Minche Li Committed by Android (Google) Code Review
Browse files

Merge "Input window info has the same token with newTouchedWindowHandle is not obscured window"

parents db2c9286 f28cc4ea
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1993,13 +1993,13 @@ bool InputDispatcher::isWindowObscuredAtPointLocked(const sp<InputWindowHandle>&
    int32_t displayId = windowHandle->getInfo()->displayId;
    const std::vector<sp<InputWindowHandle>> windowHandles = getWindowHandlesLocked(displayId);
    for (const sp<InputWindowHandle>& otherHandle : windowHandles) {
        if (otherHandle == windowHandle) {
        if (haveSameToken(otherHandle, windowHandle)) {
            break;
        }

        const InputWindowInfo* otherInfo = otherHandle->getInfo();
        if (otherInfo->displayId == displayId && otherInfo->visible &&
            !otherInfo->isTrustedOverlay() && otherInfo->frameContainsPoint(x, y)) {
        if (otherInfo->visible && !otherInfo->isTrustedOverlay() &&
            otherInfo->frameContainsPoint(x, y)) {
            return true;
        }
    }
@@ -2011,13 +2011,13 @@ bool InputDispatcher::isWindowObscuredLocked(const sp<InputWindowHandle>& window
    const std::vector<sp<InputWindowHandle>> windowHandles = getWindowHandlesLocked(displayId);
    const InputWindowInfo* windowInfo = windowHandle->getInfo();
    for (const sp<InputWindowHandle>& otherHandle : windowHandles) {
        if (otherHandle == windowHandle) {
        if (haveSameToken(otherHandle, windowHandle)) {
            break;
        }

        const InputWindowInfo* otherInfo = otherHandle->getInfo();
        if (otherInfo->displayId == displayId && otherInfo->visible &&
            !otherInfo->isTrustedOverlay() && otherInfo->overlaps(windowInfo)) {
        if (otherInfo->visible && !otherInfo->isTrustedOverlay() &&
            otherInfo->overlaps(windowInfo)) {
            return true;
        }
    }