Home | History | Annotate | Download | only in applications

Lines Matching defs:mEntry

33     private ApplicationsState.AppEntry mEntry;
37 mEntry = mock(ApplicationsState.AppEntry.class);
38 mEntry.info = mock(ApplicationInfo.class);
43 mEntry.info.flags = ApplicationInfo.FLAG_IS_GAME;
45 assertThat(ApplicationsState.FILTER_GAMES.filterApp(mEntry)).isTrue();
50 mEntry.info.category = ApplicationInfo.CATEGORY_GAME;
52 assertThat(ApplicationsState.FILTER_GAMES.filterApp(mEntry)).isTrue();
57 mEntry.info.flags = ApplicationInfo.FLAG_IS_GAME;
58 mEntry.info.category = ApplicationInfo.CATEGORY_GAME;
60 assertThat(ApplicationsState.FILTER_GAMES.filterApp(mEntry)).isTrue();
65 mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;
67 assertThat(ApplicationsState.FILTER_GAMES.filterApp(mEntry)).isFalse();
72 mEntry.info.category = ApplicationInfo.CATEGORY_AUDIO;
74 assertThat(ApplicationsState.FILTER_AUDIO.filterApp(mEntry)).isTrue();
79 mEntry.info.category = ApplicationInfo.CATEGORY_GAME;
81 assertThat(ApplicationsState.FILTER_AUDIO.filterApp(mEntry)).isFalse();
86 mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;
88 assertThat(ApplicationsState.FILTER_AUDIO.filterApp(mEntry)).isFalse();
93 mEntry.info.category = ApplicationInfo.CATEGORY_AUDIO;
95 assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
100 mEntry.info.category = ApplicationInfo.CATEGORY_GAME;
102 assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
107 mEntry.info.category = ApplicationInfo.CATEGORY_IMAGE;
109 assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
114 mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;
116 assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isTrue();
121 mEntry.info.category = ApplicationInfo.CATEGORY_IMAGE;
123 assertThat(ApplicationsState.FILTER_PHOTOS.filterApp(mEntry)).isTrue();
128 mEntry.info.category = ApplicationInfo.CATEGORY_VIDEO;
130 assertThat(ApplicationsState.FILTER_PHOTOS.filterApp(mEntry)).isFalse();
135 mEntry.info.category = ApplicationInfo.CATEGORY_UNDEFINED;
137 assertThat(ApplicationsState.FILTER_PHOTOS.filterApp(mEntry)).isFalse();
143 mEntry.isHomeApp = false;
144 mEntry.hasLauncherEntry = false;
145 when(mEntry.info.isInstantApp()).thenReturn(true);
146 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(mEntry))
150 when(mEntry.info.isInstantApp()).thenReturn(false);
151 mEntry.info.flags = ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
152 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(mEntry))
156 mEntry.info.flags = ApplicationInfo.FLAG_SYSTEM;
157 mEntry.isHomeApp = false;
158 mEntry.hasLauncherEntry = false;
159 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(mEntry))
163 mEntry.isHomeApp = true;
164 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(mEntry))
168 mEntry.isHomeApp = false;
169 mEntry.hasLauncherEntry = true;
170 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(mEntry))
176 mEntry.isHomeApp = false;
177 mEntry.hasLauncherEntry = false;
180 when(mEntry.info.isInstantApp()).thenReturn(false);
181 mEntry.info.flags = ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
182 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(mEntry))
186 mEntry.info.flags = ApplicationInfo.FLAG_SYSTEM;
187 mEntry.isHomeApp = false;
188 mEntry.hasLauncherEntry = false;
189 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(mEntry))
193 mEntry.isHomeApp = true;
194 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(mEntry))
198 mEntry.isHomeApp = false;
199 mEntry.hasLauncherEntry = true;
200 assertThat(ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(mEntry))
206 mEntry.info.flags = ApplicationInfo.FLAG_IS_GAME;
208 assertThat(ApplicationsState.FILTER_OTHER_APPS.filterApp(mEntry)).isFalse();
213 when(mEntry.info.isInstantApp()).thenReturn(true);
214 assertThat(ApplicationsState.FILTER_INSTANT.filterApp(mEntry)).isTrue();
219 when(mEntry.info.isInstantApp()).thenReturn(false);
220 assertThat(ApplicationsState.FILTER_INSTANT.filterApp(mEntry)).isFalse();
225 mEntry.info.enabled = true;
226 assertThat(ApplicationsState.FILTER_ALL_ENABLED.filterApp(mEntry)).isTrue();
227 when(mEntry.info.isInstantApp()).thenReturn(true);
228 assertThat(ApplicationsState.FILTER_ALL_ENABLED.filterApp(mEntry)).isFalse();
233 mEntry.info.privateFlags |= ApplicationInfo.PRIVATE_FLAG_HAS_DOMAIN_URLS;
235 when(mEntry.info.isInstantApp()).thenReturn(false);
236 assertThat(ApplicationsState.FILTER_WITH_DOMAIN_URLS.filterApp(mEntry))
238 mEntry.info.privateFlags &= ~ApplicationInfo.PRIVATE_FLAG_HAS_DOMAIN_URLS;
239 assertThat(ApplicationsState.FILTER_WITH_DOMAIN_URLS.filterApp(mEntry))
241 mEntry.info.privateFlags |= ApplicationInfo.PRIVATE_FLAG_HAS_DOMAIN_URLS;
242 when(mEntry.info.isInstantApp()).thenReturn(true);
243 assertThat(ApplicationsState.FILTER_WITH_DOMAIN_URLS.filterApp(mEntry))
249 mEntry.info.enabled = false;
250 assertThat(ApplicationsState.FILTER_DISABLED.filterApp(mEntry)).isTrue();
251 when(mEntry.info.isInstantApp()).thenReturn(true);
252 assertThat(ApplicationsState.FILTER_DISABLED.filterApp(mEntry)).isFalse();
257 mEntry.info.category = ApplicationInfo.CATEGORY_VIDEO;
259 assertThat(ApplicationsState.FILTER_MOVIES.filterApp(mEntry)).isTrue();
264 mEntry.info.category = ApplicationInfo.CATEGORY_GAME;
266 assertThat(ApplicationsState.FILTER_MOVIES.filterApp(mEntry)).isFalse();