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

Commit ff3011b4 authored by Wenhui Yang's avatar Wenhui Yang Committed by Android Build Coastguard Worker
Browse files

Include color layers in input list to fix tapjacking vulnerability

We can use this to compute occlusion more accurately in inputdispatcher.

Bug: 277076451
Test: app-debug.apk in the bug
Test: go/wm-smoke
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1f0301b3f1061cb89d9628bbb1d2b4594f4f29dc)
Merged-In: I1e155bcf4a6a7ff1b49338ec21bb0e9ee05a54c8
Change-Id: I1e155bcf4a6a7ff1b49338ec21bb0e9ee05a54c8
parent 7f83865f
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -594,6 +594,15 @@ bool RequestedLayerState::fillsColor() const {
            color.b >= 0.0_hf;
            color.b >= 0.0_hf;
}
}


bool RequestedLayerState::hasBufferOrSidebandStream() const {
    return ((sidebandStream != nullptr) || (externalTexture != nullptr));
}

bool RequestedLayerState::fillsColor() const {
    return !hasBufferOrSidebandStream() && color.r >= 0.0_hf && color.g >= 0.0_hf &&
            color.b >= 0.0_hf;
}

bool RequestedLayerState::hasBlur() const {
bool RequestedLayerState::hasBlur() const {
    return backgroundBlurRadius > 0 || blurRegions.size() > 0;
    return backgroundBlurRadius > 0 || blurRegions.size() > 0;
}
}