summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputWindow.cpp
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-06-07 10:10:09 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-06-07 10:10:09 -0700
commit508eb7749a4ce988d4d1a97377254add24b9bc40 (patch)
tree9f14950e50cde8816d07350fb645011d5da57377 /services/inputflinger/InputWindow.cpp
parent6500d428ce816ffa0ba099221a4987ad7bfcb4ab (diff)
parent03a53d1c7765eeb3af0bc34c3dff02ada1953fbf (diff)
downloadframeworks_native-508eb7749a4ce988d4d1a97377254add24b9bc40.zip
frameworks_native-508eb7749a4ce988d4d1a97377254add24b9bc40.tar.gz
frameworks_native-508eb7749a4ce988d4d1a97377254add24b9bc40.tar.bz2
Merge tag 'android-6.0.1_r46' into HEAD
Android 6.0.1 release 46 # gpg: Signature made Mon 06 Jun 2016 10:38:23 AM PDT using DSA key ID 9AB10E78 # gpg: Can't check signature: public key not found
Diffstat (limited to 'services/inputflinger/InputWindow.cpp')
-rw-r--r--services/inputflinger/InputWindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/inputflinger/InputWindow.cpp b/services/inputflinger/InputWindow.cpp
index fda3ffa..1b913c5 100644
--- a/services/inputflinger/InputWindow.cpp
+++ b/services/inputflinger/InputWindow.cpp
@@ -36,14 +36,16 @@ bool InputWindowInfo::touchableRegionContainsPoint(int32_t x, int32_t y) const {
}
bool InputWindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
- return x >= frameLeft && x <= frameRight
- && y >= frameTop && y <= frameBottom;
+ return x >= frameLeft && x < frameRight
+ && y >= frameTop && y < frameBottom;
}
bool InputWindowInfo::isTrustedOverlay() const {
return layoutParamsType == TYPE_INPUT_METHOD
|| layoutParamsType == TYPE_INPUT_METHOD_DIALOG
|| layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
+ || layoutParamsType == TYPE_STATUS_BAR
+ || layoutParamsType == TYPE_NAVIGATION_BAR
|| layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY;
}
@@ -51,6 +53,11 @@ bool InputWindowInfo::supportsSplitTouch() const {
return layoutParamsFlags & FLAG_SPLIT_TOUCH;
}
+bool InputWindowInfo::overlaps(const InputWindowInfo* other) const {
+ return frameLeft < other->frameRight && frameRight > other->frameLeft
+ && frameTop < other->frameBottom && frameBottom > other->frameTop;
+}
+
// --- InputWindowHandle ---