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

Commit 37b8567a authored by Sumir Kataria's avatar Sumir Kataria
Browse files

clearChoices when setting AbsListView adapters.

This allows us to reset mCheckedItemCount to 0 to match the clearing
of check states.

Bug: 63559021
Fixes: 63559021
Test: Added test to AbsListViewTest.

Change-Id: I47a0fbc25448addf75a3f7e5a282bb98360200dd
parent d1e123cb
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -913,14 +913,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                mCheckedIdStates = new LongSparseArray<Integer>();
            }
        }

        if (mCheckStates != null) {
            mCheckStates.clear();
        }

        if (mCheckedIdStates != null) {
            mCheckedIdStates.clear();
        }
        clearChoices();
    }

    /**