Always show at least 1% when some space used.

Don't let the progress value round down to 0, since that would
be misleading.

Test: builds
Bug: 24017703
Change-Id: I6a0268361645da16af67e12bf7f6823d027dd72c
This commit is contained in:
Jeff Sharkey
2016-11-15 15:17:29 -07:00
parent b7fc7ade40
commit 52aa9fb170
3 changed files with 6 additions and 4 deletions

View File

@@ -166,7 +166,7 @@ public class PublicVolumeSettings extends SettingsPreferenceFragment {
result.value, result.units));
mSummary.setSummary(getString(R.string.storage_volume_used,
Formatter.formatFileSize(context, totalBytes)));
mSummary.setPercent((int) ((usedBytes * 100) / totalBytes));
mSummary.setPercent(usedBytes, totalBytes);
}
if (mVolume.getState() == VolumeInfo.STATE_UNMOUNTED) {