[Android] Strings: Use KiB/MiB over kB/MB

Jean-Baptiste Kempf git at videolan.org
Sat May 23 17:46:51 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 23 17:46:33 2015 +0200| [cf9824ebd4d820c5018c6255d7bbf6c3d1e57fcd] | committer: Jean-Baptiste Kempf

Strings: Use KiB/MiB over kB/MB

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=cf9824ebd4d820c5018c6255d7bbf6c3d1e57fcd
---

 vlc-android/src/org/videolan/vlc/util/Strings.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/Strings.java b/vlc-android/src/org/videolan/vlc/util/Strings.java
index 89d01d0..16e360f 100644
--- a/vlc-android/src/org/videolan/vlc/util/Strings.java
+++ b/vlc-android/src/org/videolan/vlc/util/Strings.java
@@ -119,7 +119,7 @@ public class Strings {
 
     public static String readableFileSize(long size) {
         if(size <= 0) return "0";
-        final String[] units = new String[] { "B", "kB", "MB", "GB", "TB" };
+        final String[] units = new String[] { "B", "KiB", "MiB", "GiB", "TiB" };
         int digitGroups = (int) (Math.log10(size)/Math.log10(1024));
         return new DecimalFormat("#,##0.#").format(size/Math.pow(1024, digitGroups)) + " " + units[digitGroups];
     }



More information about the Android mailing list