Add a movies & tv apps category to storage settings.

Change-Id: I055e93d2a151195b90a5fd64f4fddebbbcffef59
Merged-In: Idfabe83739272b19cbef4b13a82339170f8f97b3
Fixes: 36223441
Test: Settings Robotest
This commit is contained in:
Daniel Nishi
2017-03-27 13:28:11 -07:00
parent 28e35fcf05
commit f588f7678d
11 changed files with 115 additions and 8 deletions

View File

@@ -169,6 +169,17 @@ public class StorageAsyncLoaderTest {
assertThat(result.get(PRIMARY_USER_ID).otherAppsSize).isEqualTo(11L);
}
@Test
public void testVideoAppsAreFiltered() throws Exception {
addPackage(PACKAGE_NAME_1, 0, 1, 10, ApplicationInfo.CATEGORY_VIDEO);
SparseArray<StorageAsyncLoader.AppsStorageResult> result = mLoader.loadInBackground();
assertThat(result.size()).isEqualTo(1);
assertThat(result.get(PRIMARY_USER_ID).videoAppsSize).isEqualTo(11L);
assertThat(result.get(PRIMARY_USER_ID).otherAppsSize).isEqualTo(0);
}
private ApplicationInfo addPackage(
String packageName, long cacheSize, long codeSize, long dataSize, int category) {
StorageStatsSource.AppStorageStats storageStats =