am 42b25914: Merge "Ignore accessibility overlays during visible window computation" into lmp-mr1-dev

* commit '42b25914477daa00b3adf7c3d8f89b4614b08b49':
  Ignore accessibility overlays during visible window computation
This commit is contained in:
Alan Viverette
2014-11-14 01:57:30 +00:00
committed by Android Git Automerger

View File

@@ -984,12 +984,7 @@ final class AccessibilityController {
final int visibleWindowCount = visibleWindows.size(); final int visibleWindowCount = visibleWindows.size();
for (int i = visibleWindowCount - 1; i >= 0; i--) { for (int i = visibleWindowCount - 1; i >= 0; i--) {
WindowState windowState = visibleWindows.valueAt(i); final WindowState windowState = visibleWindows.valueAt(i);
// Compute the bounds in the screen.
Rect boundsInScreen = mTempRect;
computeWindowBoundsInScreen(windowState, boundsInScreen);
final int flags = windowState.mAttrs.flags; final int flags = windowState.mAttrs.flags;
// If the window is not touchable - ignore. // If the window is not touchable - ignore.
@@ -997,6 +992,16 @@ final class AccessibilityController {
continue; 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);
// If the window is completely covered by other windows - ignore. // If the window is completely covered by other windows - ignore.
if (unaccountedSpace.quickReject(boundsInScreen)) { if (unaccountedSpace.quickReject(boundsInScreen)) {
continue; continue;
@@ -1013,14 +1018,8 @@ final class AccessibilityController {
} }
} }
// Account for the space this window takes if the window unaccountedSpace.op(boundsInScreen, unaccountedSpace,
// is not an accessibility overlay which does not change Region.Op.REVERSE_DIFFERENCE);
// 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. // We figured out what is touchable for the entire screen - done.
if (unaccountedSpace.isEmpty()) { if (unaccountedSpace.isEmpty()) {