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

Commit f79aad63 authored by Alan Viverette's avatar Alan Viverette
Browse files

Send accessibility click event after calling click listener

This ensures that any state changes made by the click listener are
correctly reflected in the accessibility event.

BUG: 16847704
Change-Id: Ib0a3b3cd5879bb77c2cd3d97e923cdfa31c8051a
parent 1a2aad0a
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -4649,16 +4649,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *         otherwise is returned.
     */
    public boolean performClick() {
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
        ListenerInfo li = mListenerInfo;
        final boolean result;
        final ListenerInfo li = mListenerInfo;
        if (li != null && li.mOnClickListener != null) {
            playSoundEffect(SoundEffectConstants.CLICK);
            li.mOnClickListener.onClick(this);
            return true;
            result = true;
        } else {
            result = false;
        }
        return false;
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
        return result;
    }
    /**