Fix a bug where image apps were double-counted.

The filter for photos apps includes them as well as the one for "other
apps". This removes them out of other apps.

Change-Id: I56058080b6492c054ea3171addd5ab343769bc9a
Fixes: 65384691
Test: SettingsLib integ test
This commit is contained in:
Daniel Nishi
2017-09-05 17:40:05 -07:00
parent ae1dd84bf0
commit b798b1c484
2 changed files with 9 additions and 1 deletions

View File

@@ -1665,7 +1665,8 @@ public class ApplicationsState {
isCategorized =
FILTER_AUDIO.filterApp(entry)
|| FILTER_GAMES.filterApp(entry)
|| FILTER_MOVIES.filterApp(entry);
|| FILTER_MOVIES.filterApp(entry)
|| FILTER_PHOTOS.filterApp(entry);
}
return !isCategorized;
}

View File

@@ -102,6 +102,13 @@ public class ApplicationsStateTest {
assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
}
@Test
public void testOtherAppsRejectsImageApp() {
mEntry.info.category = ApplicationInfo.CATEGORY_IMAGE;
assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
}
@Test
public void testOtherAppsAcceptsDefaultCategory() {
mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;