Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90abd6d1 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Ensure accessibility node cache is synced with service state" into klp-dev

parents a619afd6 3d1c5a72
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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();
+2 −1
Original line number Diff line number Diff line
@@ -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: {