Merge "Do not slide event into the new window which can't receive motion event" into main
diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp
index 8858f0c..7f54bf1 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.cpp
+++ b/services/inputflinger/dispatcher/InputDispatcher.cpp
@@ -2558,9 +2558,9 @@
return {};
}
- // Drop touch events if requested by input feature
+ // Do not slide events to the window which can not receive motion event
if (newTouchedWindowHandle != nullptr &&
- shouldDropInput(entry, newTouchedWindowHandle)) {
+ !canWindowReceiveMotionLocked(newTouchedWindowHandle, entry)) {
newTouchedWindowHandle = nullptr;
}