am cb38a97c: am 90abd6d1: Merge "Ensure accessibility node cache is synced with service state" into klp-dev

* commit 'cb38a97c08ea69902120e333297597af2a62a743':
  Ensure accessibility node cache is synced with service state
This commit is contained in:
Alan Viverette
2013-10-10 11:25:35 -07:00
committed by Android Git Automerger
2 changed files with 4 additions and 2 deletions

View File

@@ -67,11 +67,12 @@ public class AccessibilityNodeInfoCache {
if (ENABLED) {
final int eventType = event.getEventType();
switch (eventType) {
case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END:
case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED:
case AccessibilityEvent.TYPE_VIEW_HOVER_ENTER:
case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT: {
// If the active window changes, clear the cache.
final int windowId = event.getWindowId();
// If a new window, we clear the cache.
if (mWindowId != windowId) {
mWindowId = windowId;
clear();

View File

@@ -736,9 +736,9 @@ class TouchExplorer implements EventStreamTransformation {
+ "there is at least one pointer down!");
}
case MotionEvent.ACTION_UP: {
mAms.onTouchInteractionEnd();
// Announce the end of a the touch interaction.
sendAccessibilityEvent(AccessibilityEvent.TYPE_TOUCH_INTERACTION_END);
mAms.onTouchInteractionEnd();
mLongPressingPointerId = -1;
mLongPressingPointerDeltaX = 0;
mLongPressingPointerDeltaY = 0;
@@ -822,6 +822,7 @@ class TouchExplorer implements EventStreamTransformation {
AccessibilityManager accessibilityManager = AccessibilityManager.getInstance(mContext);
if (accessibilityManager.isEnabled()) {
AccessibilityEvent event = AccessibilityEvent.obtain(type);
event.setWindowId(mAms.getActiveWindowId());
accessibilityManager.sendAccessibilityEvent(event);
switch (type) {
case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_START: {