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
This commit is contained in:
@@ -75,9 +75,7 @@ public class TopLevelStoragePreferenceController extends BasePreferenceControlle
|
||||
final PrivateStorageInfo info = PrivateStorageInfo.getPrivateStorageInfo(
|
||||
getStorageManagerVolumeProvider());
|
||||
|
||||
// TODO(b/288103116): replace with new API to get TotalBytes before rounding
|
||||
// once support by StorageManager.
|
||||
long usedBytes = Utils.getPrimaryStorageSize() - info.freeBytes;
|
||||
long usedBytes = info.totalBytes - info.freeBytes;
|
||||
storageCacheHelper.cacheUsedSize(usedBytes);
|
||||
ThreadUtils.postOnMainThread(() -> {
|
||||
preference.setSummary(
|
||||
|
||||
Reference in New Issue
Block a user