summaryrefslogtreecommitdiffstats
path: root/services/accessibility
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2014-12-09 12:27:00 -0800
committerSvet Ganov <svetoslavganov@google.com>2014-12-09 12:27:04 -0800
commit12b7328c0b7f83a233d9387eaa66d1a0ed403724 (patch)
tree2051ae34e32c9fba38a5d0585d20ef4d713f6fe8 /services/accessibility
parent8b33cf4d34a9ea75e1121ee2f1d829b21f3cb5d6 (diff)
downloadframeworks_base-12b7328c0b7f83a233d9387eaa66d1a0ed403724.zip
frameworks_base-12b7328c0b7f83a233d9387eaa66d1a0ed403724.tar.gz
frameworks_base-12b7328c0b7f83a233d9387eaa66d1a0ed403724.tar.bz2
Ignore accessibility overlay when computing window's interactive region.
If an accessibility service opts-in for the new window introspection APIs when calling into a window for accessibility node infos we compute the window's interactive region, i.e. the portion that is touchable and not covered by other touchable windows, in roder to deterine whether these nodes are visible, i.e. the user can interact with them. There was a bug in the interactive region computation what we were not ignoring accessibility overlay windows which are intended to not change what an accessibility service can "see" and are put by such a service. bug:18652374 Change-Id: I24ce54069087af9bc308e0c6a7b2aa6b952a6136
Diffstat (limited to 'services/accessibility')
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 89aebe8..63a0cf6 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -3421,7 +3421,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
return false;
}
- // Windows are ordered in z order so start from the botton and find
+ // Windows are ordered in z order so start from the bottom and find
// the window of interest. After that all windows that cover it should
// be subtracted from the resulting region. Note that for accessibility
// we are returning only interactive windows.
@@ -3439,7 +3439,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
windowInteractiveRegion = outRegion;
continue;
}
- } else {
+ } else if (currentWindow.getType()
+ != AccessibilityWindowInfo.TYPE_ACCESSIBILITY_OVERLAY) {
Rect currentWindowBounds = mTempRect;
currentWindow.getBoundsInScreen(currentWindowBounds);
if (windowInteractiveRegion.op(currentWindowBounds, Region.Op.DIFFERENCE)) {