Move occlusion detection into logical space

Same as our "hit test" to find the target window, since WM works in
logical space, we consider the window's frame to be (l, t, r, b), and
the portion of the window that can be occluded in the x-direction is
[l, r), and the portion of the window that can be occluded in the
y-direction is [t, b). When the logical space is different from the
physical space, the opening and closing intervals in each of these
directions will be inconsistent, leading to abnormal detection of the
edge part. Here we move the occlusion detection to the logical
space as well, consistent with the "hit test" for finding the target
window.

Bug: 327712879
Test: atest inputflinger_tests
Test: Create a window that can cause occlusion and perform clicks on the edges, making sure that the occlusion range is x = [l, r), y = [t, b) under each direction of the screen.

Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:1a0060e9bcd25bee6ce7a9f5d01b9446b0c4d73b)
Merged-In: I19b739bc8f1e48d8bc70020a2b07da227eaa6d8b
Change-Id: I19b739bc8f1e48d8bc70020a2b07da227eaa6d8b
diff --git a/services/inputflinger/dispatcher/InputDispatcher.h b/services/inputflinger/dispatcher/InputDispatcher.h
index 269bfdd..9c8d588 100644
--- a/services/inputflinger/dispatcher/InputDispatcher.h
+++ b/services/inputflinger/dispatcher/InputDispatcher.h
@@ -565,11 +565,11 @@
     };
 
     TouchOcclusionInfo computeTouchOcclusionInfoLocked(
-            const sp<android::gui::WindowInfoHandle>& windowHandle, int32_t x, int32_t y) const
+            const sp<android::gui::WindowInfoHandle>& windowHandle, float x, float y) const
             REQUIRES(mLock);
     bool isTouchTrustedLocked(const TouchOcclusionInfo& occlusionInfo) const REQUIRES(mLock);
     bool isWindowObscuredAtPointLocked(const sp<android::gui::WindowInfoHandle>& windowHandle,
-                                       int32_t x, int32_t y) const REQUIRES(mLock);
+                                       float x, float y) const REQUIRES(mLock);
     bool isWindowObscuredLocked(const sp<android::gui::WindowInfoHandle>& windowHandle) const
             REQUIRES(mLock);
     std::string dumpWindowForTouchOcclusion(const android::gui::WindowInfo* info,