Add ability to force rebuild list

So that you can change between filters that
have the same sort order.

Test: robotests, manually switch between notifications (off) to
notifications (all)
Fixes: 169943424

Change-Id: I62bbe90f30abada2ec342487a1fa420e451b3caf
This commit is contained in:
Julia Reynolds
2021-11-05 17:12:00 -04:00
parent bf6c779caa
commit b106377155
2 changed files with 13 additions and 10 deletions

View File

@@ -455,10 +455,13 @@ public class ManageApplicationsTest {
ManageApplications.ApplicationsAdapter adapter = new ManageApplications.ApplicationsAdapter(
mState, mFragment, mock(AppFilterItem.class), mock(Bundle.class));
adapter.rebuild(mSortRecent.getItemId());
adapter.rebuild(mSortRecent.getItemId(), false);
assertThat(mFragment.mSortOrder).isEqualTo(mSortRecent.getItemId());
adapter.rebuild(mSortFrequent.getItemId());
adapter.rebuild(mSortFrequent.getItemId(), false);
assertThat(mFragment.mSortOrder).isEqualTo(mSortFrequent.getItemId());
adapter.rebuild(mSortFrequent.getItemId(), true);
assertThat(mFragment.mSortOrder).isEqualTo(mSortFrequent.getItemId());
}