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

Commit 3d1c5a72 authored by Alan Viverette's avatar Alan Viverette
Browse files

Ensure accessibility node cache is synced with service state

BUG: 11152210
Change-Id: Ibffd2909b6b06568de9344e536a200d8a7abac9d
parent b0975540
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: {