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

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

Merge "Always send VIEW_CLICKED event from AdapterView.performItemClick()" into mnc-dev

parents 717a2d09 376c32f2
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;
    }

    /**