Merge "Category breakdown size should match total size."

This commit is contained in:
Daniel Nishi
2017-03-15 20:30:09 +00:00
committed by Android (Google) Code Review
4 changed files with 8 additions and 3 deletions

View File

@@ -89,6 +89,8 @@ public class StorageAsyncLoader
// code size.
if (!app.isSystemApp() || app.isUpdatedSystemApp()) {
attributedAppSizeInBytes += stats.getCodeBytes();
} else {
result.systemSize += stats.getCodeBytes();
}
switch (app.category) {
case CATEGORY_GAME:
@@ -122,6 +124,7 @@ public class StorageAsyncLoader
public long gamesSize;
public long musicAppsSize;
public long otherAppsSize;
public long systemSize;
public StorageStatsSource.ExternalStorageStats externalStats;
}

View File

@@ -181,7 +181,7 @@ public class StorageItemPreferenceController extends PreferenceController {
mGamePreference.setStorageSize(data.gamesSize);
mAppPreference.setStorageSize(data.otherAppsSize);
if (mSystemPreference != null) {
mSystemPreference.setStorageSize(mSystemSize);
mSystemPreference.setStorageSize(mSystemSize + data.systemSize);
}
long unattributedBytes = data.externalStats.totalBytes - data.externalStats.audioBytes