Merge "Fix a bug where image apps were double-counted." into oc-mr1-dev

am: 5d340bce89

Change-Id: I0922506112f5ad943f827765c82b81a9287a52d7
This commit is contained in:
Daniel Nishi
2017-09-06 21:06:38 +00:00
committed by android-build-merger
2 changed files with 9 additions and 1 deletions

View File

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

View File

@@ -102,6 +102,13 @@ public class ApplicationsStateTest {
assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse(); 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 @Test
public void testOtherAppsAcceptsDefaultCategory() { public void testOtherAppsAcceptsDefaultCategory() {
mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED; mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;