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

Commit 5d340bce authored by Daniel Nishi's avatar Daniel Nishi Committed by Android (Google) Code Review
Browse files

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

parents 2556236f b798b1c4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
                }
+7 −0
Original line number Diff line number Diff line
@@ -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;