summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSvetoslav <svetoslavganov@google.com>2015-01-23 14:40:52 -0800
committerSvetoslav <svetoslavganov@google.com>2015-01-23 15:05:20 -0800
commit10a053e474e2a566b49a1e4c9e2ec4c8cc0013bd (patch)
tree6b104a4ca7ece00d6d9d9f053caeac1f26c4987f /services
parent42a13865a4527aaf907a6ced96f726b49b2cbbed (diff)
downloadframeworks_base-10a053e474e2a566b49a1e4c9e2ec4c8cc0013bd.zip
frameworks_base-10a053e474e2a566b49a1e4c9e2ec4c8cc0013bd.tar.gz
frameworks_base-10a053e474e2a566b49a1e4c9e2ec4c8cc0013bd.tar.bz2
Accessibility: Sometimes cannot interact with nav bar items.
If there is a window with the accessibility focus we want to click on the accessibility focused view in this window. The logic to compute the bounds of the window was using the wrong window id, hence getting an incorrect result. As a consequence in some cases the user could not click on accessiiblity focused controls in the nav bar. bug:18889611 Change-Id: I89aee3ae2ffe27fe29819049c287a7155154c65b
Diffstat (limited to 'services')
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 5ae26ef..bbf3644 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -765,16 +765,13 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
}
/**
- * Gets the bounds of the active window.
+ * Gets the bounds of a window.
*
* @param outBounds The output to which to write the bounds.
*/
- boolean getActiveWindowBounds(Rect outBounds) {
- // TODO: This should be refactored to work with accessibility
- // focus in multiple windows.
+ boolean getWindowBounds(int windowId, Rect outBounds) {
IBinder token;
synchronized (mLock) {
- final int windowId = mSecurityPolicy.mActiveWindowId;
token = mGlobalWindowTokens.get(windowId);
if (token == null) {
token = getCurrentUserStateLocked().mWindowTokens.get(windowId);
@@ -3255,7 +3252,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
// Make sure the point is within the window.
Rect windowBounds = mTempRect;
- getActiveWindowBounds(windowBounds);
+ getWindowBounds(focus.getWindowId(), windowBounds);
if (!windowBounds.contains(point.x, point.y)) {
return false;
}