Update the API usage to get total size of devices
StorageStatsManager fixed in StorageStatsService#getTotalBytes
So that we should change back to call the API.
Bug: 295358118
Bug: 288103116
Test: verified manually
Change-Id: I3dcc9698403612f961cf0de41925dcbcb43e260b
(cherry picked from commit 2d57d002ae
)
This commit is contained in:
@@ -387,9 +387,7 @@ public class StorageDashboardFragment extends DashboardFragment
|
||||
|
||||
setLoading(false /* loading */, false /* animate */);
|
||||
|
||||
// TODO(b/288103116): replace with new API to get TotalBytes before rounding
|
||||
// once support by StorageManager.
|
||||
final long privateUsedBytes = Utils.getPrimaryStorageSize() - mStorageInfo.freeBytes;
|
||||
final long privateUsedBytes = mStorageInfo.totalBytes - mStorageInfo.freeBytes;
|
||||
mPreferenceController.setVolume(mSelectedStorageEntry.getVolumeInfo());
|
||||
mPreferenceController.setUsedSize(privateUsedBytes);
|
||||
mPreferenceController.setTotalSize(mStorageInfo.totalBytes);
|
||||
|
Reference in New Issue
Block a user