diff options
| author | Svetoslav <svetoslavganov@google.com> | 2014-06-10 18:00:12 -0700 |
|---|---|---|
| committer | Svetoslav Ganov <svetoslavganov@google.com> | 2014-06-11 01:05:04 +0000 |
| commit | e16a5009cc02548266e483ee2456c631914519ac (patch) | |
| tree | 8af9152ba0411b4e96153171f898b15fc7d039d6 /core/java/android/view/accessibility | |
| parent | 937c4dbb1fdc1afcdc3c4b57d6799d1f49acf9f0 (diff) | |
| download | frameworks_base-e16a5009cc02548266e483ee2456c631914519ac.zip frameworks_base-e16a5009cc02548266e483ee2456c631914519ac.tar.gz frameworks_base-e16a5009cc02548266e483ee2456c631914519ac.tar.bz2 | |
Accessibility window changes not reported.
On accessibility service side we were asking only for cached windows but since
to optimize performance the system is sending only deltas for windows the service
already introspected, new windows were not seen by the accessibility service.
bug:15092286
Change-Id: I7e9c360f624c53ff1773c485a8907dc425e3352a
Diffstat (limited to 'core/java/android/view/accessibility')
| -rw-r--r-- | core/java/android/view/accessibility/AccessibilityInteractionClient.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityInteractionClient.java b/core/java/android/view/accessibility/AccessibilityInteractionClient.java index 5b9372d..4748402 100644 --- a/core/java/android/view/accessibility/AccessibilityInteractionClient.java +++ b/core/java/android/view/accessibility/AccessibilityInteractionClient.java @@ -225,17 +225,11 @@ public final class AccessibilityInteractionClient try { IAccessibilityServiceConnection connection = getConnection(connectionId); if (connection != null) { - List<AccessibilityWindowInfo> windows = sAccessibilityCache.getWindows(); - if (windows != null) { - if (DEBUG) { - Log.i(LOG_TAG, "Window cache hit"); - } - return windows; - } - if (DEBUG) { - Log.i(LOG_TAG, "Window cache miss"); - } - windows = connection.getWindows(); + // The system is just sending data for windows that we introspected + // and changed but not ones that appeared, so we have to always call + // into the system process. This is less expensice as opposed to + // sending all windows on every window change. + List<AccessibilityWindowInfo> windows = connection.getWindows(); if (windows != null) { final int windowCount = windows.size(); for (int i = 0; i < windowCount; i++) { |
