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

Commit 5ae74b7f authored by Yigit Boyar's avatar Yigit Boyar Committed by Android (Google) Code Review
Browse files

Merge "Check if item is selectable before calling on click" into nyc-dev

parents 7f2b6e2a 418d0cf5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3078,7 +3078,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            final int motionPosition = mClickMotionPosition;
            if (adapter != null && mItemCount > 0 &&
                    motionPosition != INVALID_POSITION &&
                    motionPosition < adapter.getCount() && sameWindow()) {
                    motionPosition < adapter.getCount() && sameWindow() &&
                    adapter.isEnabled(motionPosition)) {
                final View view = getChildAt(motionPosition - mFirstPosition);
                // If there is no view, something bad happened (the view scrolled off the
                // screen, etc.) and we should cancel the click