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

Commit 376c32f2 authored by Alan Viverette's avatar Alan Viverette
Browse files

Always send VIEW_CLICKED event from AdapterView.performItemClick()

This makes it consistent with View.performClick().

Bug: 19574976
Change-Id: I00b222d56aa6fac03c2e6ead0604ee2ff3a6969d
parent bdd500ec
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -304,16 +304,19 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
     *         called, false otherwise is returned.
     */
    public boolean performItemClick(View view, int position, long id) {
        final boolean result;
        if (mOnItemClickListener != null) {
            playSoundEffect(SoundEffectConstants.CLICK);
            mOnItemClickListener.onItemClick(this, view, position, id);
            result = true;
        } else {
            result = false;
        }

        if (view != null) {
            view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
        }
            return true;
        }

        return false;
        return result;
    }

    /**