Clear clicked nodes from the accessibiliy cache.

Nodes that are clicked can change state as a result of a click,
e.g. a check box. The accessibility service may decide to get the
source node from the click event to probe its state and get a
cached state since the window content changed event is after the
click one. Therefore, we have to clear the state of the click
event's source from the cache to ensure the client can query the
latest state of that source.

bug:18625975

Change-Id: I9e339c2fdcf74f260bb8ad86b9b873f7ddd75f19
This commit is contained in:
Svet Ganov
2014-12-05 16:52:27 -08:00
parent 0c1a5bea2e
commit 0322100598

View File

@@ -78,6 +78,7 @@ final class AccessibilityCache {
case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED:
case AccessibilityEvent.TYPE_VIEW_SELECTED:
case AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED:
case AccessibilityEvent.TYPE_VIEW_CLICKED:
case AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED: {
refreshCachedNodeLocked(event.getWindowId(), event.getSourceNodeId());
} break;