diff options
author | 2024-12-19 20:19:28 +0000 | |
---|---|---|
committer | 2025-04-15 11:59:19 -0700 | |
commit | ff3011b427f6d1b8939f1e0e383b15208410d384 (patch) | |
tree | 6d361b8a9302556aec6fef67a69c2ff125651ebf | |
parent | 7f83865f6fa01d85f491484242b904ddd354ca1b (diff) |
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
-rw-r--r-- | services/surfaceflinger/FrontEnd/RequestedLayerState.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp index 621fd6c00e..a469fc52fa 100644 --- a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp +++ b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp @@ -594,6 +594,15 @@ bool RequestedLayerState::fillsColor() const { 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 { return backgroundBlurRadius > 0 || blurRegions.size() > 0; } |