Show "0" instead of "0 B" in storage settings.

Two benefits:
  - "0 B" might be a little confusing for sighted users
  - "zero bee" is definitely confusing for TalkBack users

Nonzero storage items will still read as "640 KB" which
should be enough for anyone.

Change-Id: I5c89f7c6382ca14fb91d7d1dd145977f855618ae
Fixes: 27973778
This commit is contained in:
Dan Sandler
2016-06-20 23:53:34 -04:00
parent 333ba2df01
commit 89d5659643

View File

@@ -38,7 +38,9 @@ public class StorageItemPreference extends Preference {
}
public void setStorageSize(long size, long total) {
setSummary(Formatter.formatFileSize(getContext(), size));
setSummary(size == 0
? String.valueOf(0)
: Formatter.formatFileSize(getContext(), size));
if (total == 0) {
progress = 0;
} else {