Fall back to whatever statvfs() tells us.
Test: builds, boots
Bug:
37573475
Change-Id: I713564292d41797e80860d6aa739266d9799af7f
final MeasurementDetails details = new MeasurementDetails();
if (mVolume == null) return details;
+ if (mVolume.getType() == VolumeInfo.TYPE_PUBLIC) {
+ details.totalSize = mVolume.getPath().getTotalSpace();
+ details.availSize = mVolume.getPath().getUsableSpace();
+ return details;
+ }
+
try {
details.totalSize = mStats.getTotalBytes(mVolume.fsUuid);
details.availSize = mStats.getFreeBytes(mVolume.fsUuid);
return details;
}
-
final long finishTotal = SystemClock.elapsedRealtime();
Log.d(TAG, "Measured total storage in " + (finishTotal - start) + "ms");