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

Commit f3b8e6fe authored by Adam Powell's avatar Adam Powell
Browse files

Fix regression in AbsListView CHOICE_MODE_SINGLE

Earlier patch reversed a few lines of code that allowed deselection of
the currently selected item in CHOICE_MODE_SINGLE. Put it back the way
it was.

Bug 7289436

Change-Id: Ia1c5f3238d2faa3dd79e474851333fda90978d3c
parent 68e11d40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1077,8 +1077,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                checkedStateChanged = true;
            } else if (mChoiceMode == CHOICE_MODE_SINGLE) {
                boolean checked = !mCheckStates.get(position, false);
                mCheckStates.clear();
                if (checked) {
                    mCheckStates.clear();
                    mCheckStates.put(position, true);
                    if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
                        mCheckedIdStates.clear();