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

Commit 5fcd8cf3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Exempt (0-opacity & NOT_TOUCHABLE) windows from occlusion detection"

parents f1cdd0c4 653d2e0c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2192,6 +2192,15 @@ static bool canBeObscuredBy(const sp<InputWindowHandle>& windowHandle,
    auto otherInfo = otherHandle->getInfo();
    if (!otherInfo->visible) {
        return false;
    } else if (otherInfo->alpha == 0 &&
               otherInfo->flags.test(InputWindowInfo::Flag::NOT_TOUCHABLE)) {
        // Those act as if they were invisible, so we don't need to flag them.
        // We do want to potentially flag touchable windows even if they have 0
        // opacity, since they can consume touches and alter the effects of the
        // user interaction (eg. apps that rely on
        // FLAG_WINDOW_IS_PARTIALLY_OBSCURED should still be told about those
        // windows), hence we also check for FLAG_NOT_TOUCHABLE.
        return false;
    } else if (info->ownerUid == otherInfo->ownerUid) {
        // If ownerUid is the same we don't generate occlusion events as there
        // is no security boundary within an uid.