summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Conley Owens <cco3@android.com> 2014-04-23 13:50:03 -0700
committer Conley Owens <cco3@android.com> 2014-04-23 13:51:20 -0700
commit51eb29fa9a2ffe9c5adb9ea25bfbd51992ff16a4 (patch)
tree2ca1f594e71fa7b8a0b0bd1c1989818eade1f0c1
parente4d9761196beb35ad225e8d3fb60ba3582c86cc6 (diff)
Add TYPE_MAGNIFICATION_OVERLAY to isTrustedOverlay
This fixes a bug where a View with filterTouchesWhenObscured will have all touches filtered when in magnification accessibility mode. This is due to magnification being a separate Window over top of the running Activity. The method onFilterTouchEventForSecurity in View will then always return false when filterTouchesWhenObscured is enabled on the View. By adding the magnification Window to the list of Trusted Overlays we can ensure that touches will work properly with this property enabled. This corresponds to AOSP change I07706588a625682d05da5cb19f401139eb08a54c Change-Id: Iba095433a1f9045349d1b47a58a33b850ed31c97
-rw-r--r--services/inputflinger/InputWindow.cpp1
-rw-r--r--services/inputflinger/InputWindow.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/services/inputflinger/InputWindow.cpp b/services/inputflinger/InputWindow.cpp
index da59159196..fda3ffa2bb 100644
--- a/services/inputflinger/InputWindow.cpp
+++ b/services/inputflinger/InputWindow.cpp
@@ -43,6 +43,7 @@ bool InputWindowInfo::frameContainsPoint(int32_t x, int32_t y) const {
bool InputWindowInfo::isTrustedOverlay() const {
return layoutParamsType == TYPE_INPUT_METHOD
|| layoutParamsType == TYPE_INPUT_METHOD_DIALOG
+ || layoutParamsType == TYPE_MAGNIFICATION_OVERLAY
|| layoutParamsType == TYPE_SECURE_SYSTEM_OVERLAY;
}
diff --git a/services/inputflinger/InputWindow.h b/services/inputflinger/InputWindow.h
index 9618ffe00b..5879c84a64 100644
--- a/services/inputflinger/InputWindow.h
+++ b/services/inputflinger/InputWindow.h
@@ -106,6 +106,7 @@ struct InputWindowInfo {
TYPE_NAVIGATION_BAR = FIRST_SYSTEM_WINDOW+19,
TYPE_VOLUME_OVERLAY = FIRST_SYSTEM_WINDOW+20,
TYPE_BOOT_PROGRESS = FIRST_SYSTEM_WINDOW+21,
+ TYPE_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW+22,
LAST_SYSTEM_WINDOW = 2999,
};