From a33666a7cacc72ad1ebcd1652a241b2bb7149914 Mon Sep 17 00:00:00 2001 From: Zach Swasey Date: Thu, 17 Apr 2014 17:49:35 -0700 Subject: [PATCH] Add TYPE_MAGNIFICATION_OVERLAY to InputWindowInfo::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. Change-Id: I07706588a625682d05da5cb19f401139eb08a54c --- services/input/InputWindow.cpp | 1 + services/input/InputWindow.h | 1 + 2 files changed, 2 insertions(+) diff --git a/services/input/InputWindow.cpp b/services/input/InputWindow.cpp index fe61918e1d868..18cd8eb7490df 100644 --- a/services/input/InputWindow.cpp +++ b/services/input/InputWindow.cpp @@ -36,6 +36,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/input/InputWindow.h b/services/input/InputWindow.h index 28fa7ab42d44c..bd325b5be27da 100644 --- a/services/input/InputWindow.h +++ b/services/input/InputWindow.h @@ -105,6 +105,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+27, LAST_SYSTEM_WINDOW = 2999, };