summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@android.com>2011-05-13 13:07:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-13 13:07:44 -0700
commit0d9288d7848e144fdf7afbd7284254dae3d13d43 (patch)
treea7ca6878985d5b47da4ff8f24e596added5c79e1 /services
parent2e4a3236a7634d17f89288e9739a438ecbea0471 (diff)
parent2bdb756cdfc5e5d19e1621ae4a603b27963d6a5c (diff)
downloadframeworks_base-0d9288d7848e144fdf7afbd7284254dae3d13d43.zip
frameworks_base-0d9288d7848e144fdf7afbd7284254dae3d13d43.tar.gz
frameworks_base-0d9288d7848e144fdf7afbd7284254dae3d13d43.tar.bz2
am 2bdb756c: am 4fb76253: Fix bounds check. Bug: 4413945
* commit '2bdb756cdfc5e5d19e1621ae4a603b27963d6a5c': Fix bounds check. Bug: 4413945
Diffstat (limited to 'services')
-rw-r--r--services/input/InputWindow.cpp3
-rw-r--r--services/input/InputWindow.h5
2 files changed, 2 insertions, 6 deletions
diff --git a/services/input/InputWindow.cpp b/services/input/InputWindow.cpp
index ccea9e4..b552f6d 100644
--- a/services/input/InputWindow.cpp
+++ b/services/input/InputWindow.cpp
@@ -29,7 +29,8 @@ bool InputWindow::touchableRegionContainsPoint(int32_t x, int32_t y) const {
}
bool InputWindow::frameContainsPoint(int32_t x, int32_t y) const {
- return x <= frameRight || y <= frameBottom;
+ return x >= frameLeft && x <= frameRight
+ && y >= frameTop && y <= frameBottom;
}
bool InputWindow::isTrustedOverlay() const {
diff --git a/services/input/InputWindow.h b/services/input/InputWindow.h
index 72f1773..085c6af 100644
--- a/services/input/InputWindow.h
+++ b/services/input/InputWindow.h
@@ -145,11 +145,6 @@ struct InputWindow {
bool touchableRegionContainsPoint(int32_t x, int32_t y) const;
bool frameContainsPoint(int32_t x, int32_t y) const;
- /* These use the globalScale to convert a given screen offset to the
- * corresponding location within the window.
- */
- int32_t displayToWindowX(int32_t x) const;
-
/* Returns true if the window is of a trusted type that is allowed to silently
* overlay other windows for the purpose of implementing the secure views feature.
* Trusted overlays, such as IME windows, can partly obscure other windows without causing