From 0ef10171df111bfa8510e569f4bc939e64beb842 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 1 Dec 2014 21:51:53 -0800 Subject: Use localized byte formats --- src/github/daneren2005/dsub/fragments/MainFragment.java | 8 ++++---- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 2 +- src/github/daneren2005/dsub/util/Notifications.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/MainFragment.java b/src/github/daneren2005/dsub/fragments/MainFragment.java index 403bad03..f6f7875c 100644 --- a/src/github/daneren2005/dsub/fragments/MainFragment.java +++ b/src/github/daneren2005/dsub/fragments/MainFragment.java @@ -374,10 +374,10 @@ public class MainFragment extends SubsonicFragment { return getResources().getString(R.string.main_about_text, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName, used.getFirst(), - Util.formatBytes(used.getSecond()), - Util.formatBytes(Util.getCacheSizeMB(context) * 1024L * 1024L), - Util.formatBytes(bytesAvailableFs), - Util.formatBytes(bytesTotalFs)); + Util.formatLocalizedBytes(used.getSecond(), context), + Util.formatLocalizedBytes(Util.getCacheSizeMB(context) * 1024L * 1024L, context), + Util.formatLocalizedBytes(bytesAvailableFs, context), + Util.formatLocalizedBytes(bytesTotalFs, context)); } @Override diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 1856cc6a..5cb7c32f 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -1247,7 +1247,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR msg += "\nCached Bitrate: " + bitrate + " kbps"; } if(size != 0) { - msg += "\nSize: " + Util.formatBytes(size); + msg += "\nSize: " + Util.formatLocalizedBytes(size, context); } if(song.getDuration() != null && song.getDuration() != 0) { msg += "\nLength: " + Util.formatDuration(song.getDuration()); diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java index 3eace1dd..330e14ec 100644 --- a/src/github/daneren2005/dsub/util/Notifications.java +++ b/src/github/daneren2005/dsub/util/Notifications.java @@ -231,7 +231,7 @@ public final class Notifications { String currentDownloading, currentSize; if(file != null) { currentDownloading = file.getSong().getTitle(); - currentSize = Util.formatBytes(file.getEstimatedSize()); + currentSize = Util.formatLocalizedBytes(file.getEstimatedSize(), context); } else { currentDownloading = "none"; currentSize = "0"; -- cgit v1.2.3