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

Commit 73e0546c authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fixed a regression setting ListView selection mode without an adapter"

parents afc591ee cb704cd1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -455,6 +455,12 @@ public class ListView extends AbsListView {
                checkSelectionChanged();
            }

            if (mChoiceMode != CHOICE_MODE_NONE &&
                    mAdapter.hasStableIds() &&
                    mCheckedIdStates == null) {
                mCheckedIdStates = new LongSparseArray<Boolean>();
            }

        } else {
            mAreAllItemsSelectable = true;
            checkFocus();
@@ -3320,7 +3326,7 @@ public class ListView extends AbsListView {
            if (mCheckStates == null) {
                mCheckStates = new SparseBooleanArray();
            }
            if (mCheckedIdStates == null && mAdapter.hasStableIds()) {
            if (mCheckedIdStates == null && mAdapter != null && mAdapter.hasStableIds()) {
                mCheckedIdStates = new LongSparseArray<Boolean>();
            }
        }