summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Svetoslav <svetoslavganov@google.com> 2014-09-17 17:17:50 -0700
committer Svetoslav Ganov <svetoslavganov@google.com> 2014-09-18 01:40:27 +0000
commit4c6a4ce03bb5b20103a656948a1932f2894e7f56 (patch)
tree0e53c28e44be84e06597242878f12de2fc188c33
parent0cf001db60bd97bca26049d76723c5d99d4c5cac (diff)
Some accessibility events wrongly filtered out (regression).
We added new APIs to allow accessibility services to query all windows a user can touch. Sometimes the window state change event arrives before the window manager sent over the new window state which leads to a case that the app gets the event and asks for the window and the window is not there. To address this if we do not have the window, we hold on to the event and fire it as soon as the window arrives. This logic is correct except we were wrongly expecting that the window should have input focus. bug:17464645 Change-Id: I1ef50ebddeb4416a6c0776b096bb16aee703700c
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java4
1 files changed, 2 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 ebe21ff58da5..24bfba640c59 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -3277,7 +3277,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
// But we still have not gotten the window state from the
// window manager, so delay the notification until then.
AccessibilityWindowInfo window = findWindowById(event.getWindowId());
- if (window == null || !window.isFocused()) {
+ if (window == null) {
mShowingFocusedWindowEvent = AccessibilityEvent.obtain(event);
return false;
}
@@ -3377,7 +3377,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
if (mShowingFocusedWindowEvent != null) {
final int windowId = mShowingFocusedWindowEvent.getWindowId();
AccessibilityWindowInfo window = findWindowById(windowId);
- if (window != null && window.isFocused()) {
+ if (window != null) {
// Sending does the recycle.
sendAccessibilityEvent(mShowingFocusedWindowEvent, mCurrentUserId);
}