Add blob size to shared data dev options screens.

Bug: 156671006
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SharedDataPreferenceControllerTest
Test: manual (visual)
Change-Id: Ia98c3d9812f6225ee834b4d1b0f12a1a73a87598
This commit is contained in:
Varun Shah
2020-06-05 21:47:29 -07:00
parent 03b20f864a
commit c920a58d5f
6 changed files with 19 additions and 1 deletions

View File

@@ -39,4 +39,9 @@ class SharedDataUtils {
CALENDAR.setTimeInMillis(millis);
return FORMATTER.format(CALENDAR.getTime());
}
static String formatSize(long sizeBytes) {
final double sizeInMb = sizeBytes / (1024.0 * 1024.0);
return String.format("%.2f MB", sizeInMb);
}
}