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:
@@ -66,7 +66,6 @@ import android.os.BatteryManager;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.IBinder;
|
||||
import android.os.INetworkManagementService;
|
||||
import android.os.RemoteException;
|
||||
@@ -1354,14 +1353,4 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
return dreamsSupported && (!dreamsOnlyEnabledForDockUser || canCurrentUserDream(context));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get private total size directly.
|
||||
* Referred from StorageManager
|
||||
*/
|
||||
public static long getPrimaryStorageSize() {
|
||||
// TODO(b/288103116): remove this method once support by StorageManager.
|
||||
return Environment.getDataDirectory().getTotalSpace()
|
||||
+ Environment.getRootDirectory().getTotalSpace();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user