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

Commit b4c547a5 authored by Romain Guy's avatar Romain Guy
Browse files

Fix possible NPE in AbsListView.positionSelector().

ListView was being reckless and calling the method with a null object in some
situations.

Change-Id: Ibb595a1ff6f916c699e4af55450966dd7fd8c156
parent aef439e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1150,7 +1150,7 @@ public class GridView extends AbsListView {
               mSelectedTop = sel.getTop();
            } else if (mTouchMode > TOUCH_MODE_DOWN && mTouchMode < TOUCH_MODE_SCROLL) {
                View child = getChildAt(mMotionPosition - mFirstPosition);
                positionSelector(child);
                if (child != null) positionSelector(child);                
            } else {
                mSelectedTop = 0;
                mSelectorRect.setEmpty();
+1 −1
Original line number Diff line number Diff line
@@ -1567,7 +1567,7 @@ public class ListView extends AbsListView {
            } else {
                if (mTouchMode > TOUCH_MODE_DOWN && mTouchMode < TOUCH_MODE_SCROLL) {
                    View child = getChildAt(mMotionPosition - mFirstPosition);
                    positionSelector(child);
                    if (child != null) positionSelector(child);
                } else {
                    mSelectedTop = 0;
                    mSelectorRect.setEmpty();