Merge "Change how we calculate system size." into oc-dev am: 0b75d39312

am: aebda427d8

Change-Id: I7a0efbf7745fe52d9dbefe94ead07be603b6f96e
This commit is contained in:
Daniel Nishi
2017-04-20 00:58:05 +00:00
committed by android-build-merger
3 changed files with 25 additions and 23 deletions

View File

@@ -78,7 +78,7 @@ public class StorageItemPreferenceController extends PreferenceController {
private final StorageVolumeProvider mSvp;
private VolumeInfo mVolume;
private int mUserId;
private long mSystemSize;
private long mUsedBytes;
private long mTotalSize;
private StorageItemPreference mPhotoPreference;
@@ -226,17 +226,29 @@ public class StorageItemPreferenceController extends PreferenceController {
mGamePreference.setStorageSize(data.gamesSize, mTotalSize);
mMoviesPreference.setStorageSize(data.videoAppsSize, mTotalSize);
mAppPreference.setStorageSize(data.otherAppsSize, mTotalSize);
if (mSystemPreference != null) {
mSystemPreference.setStorageSize(mSystemSize + data.systemSize, mTotalSize);
}
long unattributedBytes = data.externalStats.totalBytes - data.externalStats.audioBytes
- data.externalStats.videoBytes - data.externalStats.imageBytes;
mFilePreference.setStorageSize(unattributedBytes, mTotalSize);
long unattributedExternalBytes =
data.externalStats.totalBytes
- data.externalStats.audioBytes
- data.externalStats.videoBytes
- data.externalStats.imageBytes;
mFilePreference.setStorageSize(unattributedExternalBytes, mTotalSize);
// We define the system size as everything we can't classify.
if (mSystemPreference != null) {
mSystemPreference.setStorageSize(
mUsedBytes
- data.externalStats.totalBytes
- data.musicAppsSize
- data.gamesSize
- data.videoAppsSize
- data.otherAppsSize,
mTotalSize);
}
}
public void setSystemSize(long systemSizeBytes) {
mSystemSize = systemSizeBytes;
public void setUsedSize(long usedSizeBytes) {
mUsedBytes = usedSizeBytes;
}
public void setTotalSize(long totalSizeBytes) {