Fix filter bug for non-internal app filtering.
By default, the filter would show all non-categorized apps. This, however, regressed the external storage apps view which does not have categorization (yet). By adding back in a legacy option to use the old purely UUID filtering, we can fix the regression. Change-Id: I72d8d3bc08fbdff53374eb1e973bce9f8d7e2e79 Fixes: 63542896 Test: Settings unit test
This commit is contained in:
@@ -116,4 +116,20 @@ public class ManageApplicationsUnitTest {
|
||||
|
||||
assertThat(composedFilter.filterApp(appEntry)).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCompositeFilter_worksForLegacyPrivateSettings() throws Exception {
|
||||
ApplicationsState.AppFilter filter =
|
||||
ManageApplications.getCompositeFilter(
|
||||
ManageApplications.LIST_TYPE_STORAGE,
|
||||
ManageApplications.STORAGE_TYPE_LEGACY,
|
||||
"uuid");
|
||||
final ApplicationInfo info = new ApplicationInfo();
|
||||
info.volumeUuid = "uuid";
|
||||
info.category = ApplicationInfo.CATEGORY_GAME;
|
||||
final ApplicationsState.AppEntry appEntry = mock(ApplicationsState.AppEntry.class);
|
||||
appEntry.info = info;
|
||||
|
||||
assertThat(filter.filterApp(appEntry)).isTrue();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user