summaryrefslogtreecommitdiff
path: root/services/inputflinger/dispatcher/InputDispatcher.cpp
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2020-12-09 08:07:46 -1000
committerGeorge Zacharia <george.zcharia@gmail.com>2022-03-09 19:33:18 +0530
commit4c6e9de69eaa44060efb1799b02698e04a5d36a2 (patch)
tree28d52a97e1000775f0fbc7943b2415e8a0308b5a /services/inputflinger/dispatcher/InputDispatcher.cpp
parentda63a29f15ec2cc9a69720699c98a6ba23751b48 (diff)
Check if the window is partially obscured for slippery entersr11.1
Currently, we only check whether a window is partially obscured during the initial tap down. However, there is another use case: slippery enter. During a slippery enter, the touch down is generated into the slipped-into window, and touch cancel is generated for the slipped-from window. The window receiving the slippery enter does not need to have any flags. Until we figure out whether we can restrict the usage of this flag to system components, add this check as an intermediate fix. Bug: 157929241 Test: atest FlagSlipperyTest Test: atest inputflinger_tests Change-Id: I93d9681479f41244ffed4b1f88cceb69be71adf2 Merged-In: I93d9681479f41244ffed4b1f88cceb69be71adf2 (cherry picked from commit d8c6ef21387db53930d728272db24cca1cd38a38) Merged-In:I93d9681479f41244ffed4b1f88cceb69be71adf2
Diffstat (limited to 'services/inputflinger/dispatcher/InputDispatcher.cpp')
-rw-r--r--services/inputflinger/dispatcher/InputDispatcher.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index fe016af01f..8907b3576d 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -1782,6 +1782,8 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
}
if (isWindowObscuredAtPointLocked(newTouchedWindowHandle, x, y)) {
targetFlags |= InputTarget::FLAG_WINDOW_IS_OBSCURED;
+ } else if (isWindowObscuredLocked(newTouchedWindowHandle)) {
+ targetFlags |= InputTarget::FLAG_WINDOW_IS_PARTIALLY_OBSCURED;
}
BitSet32 pointerIds;