From 51eb29fa9a2ffe9c5adb9ea25bfbd51992ff16a4 Mon Sep 17 00:00:00 2001 From: Conley Owens Date: Wed, 23 Apr 2014 13:50:03 -0700 Subject: [PATCH] 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 --- services/inputflinger/InputWindow.cpp | 1 + services/inputflinger/InputWindow.h | 1 + 2 files changed, 2 insertions(+) diff --git a/services/inputflinger/InputWindow.cpp b/services/inputflinger/InputWindow.cpp index da5915919..fda3ffa2b 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 9618ffe00..5879c84a6 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, };