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

Commit 65a898d9 authored by Alan Viverette's avatar Alan Viverette
Browse files

Simplifying accessibility code in keyboard's dispatchTouchEvent()

Change-Id: Ie33cf93ee2d7eadad38ca170aa8ad988bb0ae9a9
parent 0a5345c7
Loading
Loading
Loading
Loading
+0 −9
Original line number Original line Diff line number Diff line
@@ -118,15 +118,6 @@ public class AccessibleKeyboardViewProxy {
        return onHoverEventInternal(event, tracker);
        return onHoverEventInternal(event, tracker);
    }
    }


    public boolean dispatchTouchEvent(MotionEvent event) {
        // Since touch exploration translates hover double-tap to a regular
        // single-tap, we're going to drop non-touch exploration events.
        if (!AccessibilityUtils.getInstance().isTouchExplorationEvent(event))
            return true;

        return false;
    }

    /**
    /**
     * Handles touch exploration events when Accessibility is turned on.
     * Handles touch exploration events when Accessibility is turned on.
     *
     *
+2 −2
Original line number Original line Diff line number Diff line
@@ -567,9 +567,9 @@ public class LatinKeyboardBaseView extends KeyboardView implements PointerTracke


    @Override
    @Override
    public boolean dispatchTouchEvent(MotionEvent event) {
    public boolean dispatchTouchEvent(MotionEvent event) {
        // Drop non-hover touch events when touch exploration is enabled.
        if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
        if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
            return AccessibleKeyboardViewProxy.getInstance().dispatchTouchEvent(event)
            return false;
                    || super.dispatchTouchEvent(event);
        }
        }


        return super.dispatchTouchEvent(event);
        return super.dispatchTouchEvent(event);