From d0c73f49b72a4801fc19d2bda2b9239c34c6fa06 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Tue, 18 Nov 2014 10:25:04 -0800 Subject: [PATCH] Don't ignore accessibility overlays during visibility computation Just don't use then to compute unaccounted space. This is a partial revert of commit 9538eea5ff6f8e2183ced81b5b8eac60b0e774ea. Change-Id: Ie2e29c8934da8ef707d20db1333abd4e240cd213 --- .../server/wm/AccessibilityController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java index 7e6da8b578b0e..0cbf03a9025b1 100644 --- a/services/core/java/com/android/server/wm/AccessibilityController.java +++ b/services/core/java/com/android/server/wm/AccessibilityController.java @@ -992,12 +992,6 @@ final class AccessibilityController { continue; } - // If the window is an accessibility overlay - ignore. - if (windowState.mAttrs.type == - WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY) { - continue; - } - // Compute the bounds in the screen. final Rect boundsInScreen = mTempRect; computeWindowBoundsInScreen(windowState, boundsInScreen); @@ -1018,8 +1012,14 @@ final class AccessibilityController { } } - unaccountedSpace.op(boundsInScreen, unaccountedSpace, - Region.Op.REVERSE_DIFFERENCE); + // Account for the space this window takes if the window + // is not an accessibility overlay which does not change + // the reported windows. + if (windowState.mAttrs.type != + WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY) { + unaccountedSpace.op(boundsInScreen, unaccountedSpace, + Region.Op.REVERSE_DIFFERENCE); + } // We figured out what is touchable for the entire screen - done. if (unaccountedSpace.isEmpty()) {