aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-12-01 21:51:53 -0800
committerScott Jackson <daneren2005@gmail.com>2014-12-01 21:51:53 -0800
commit0ef10171df111bfa8510e569f4bc939e64beb842 (patch)
tree8c91c3dd72527fc112b944bb3ed01a5370fa1cf2
parent73de83856f6106b8270c0e277756fb5fdf1cd0bc (diff)
downloaddsub-0ef10171df111bfa8510e569f4bc939e64beb842.tar.gz
dsub-0ef10171df111bfa8510e569f4bc939e64beb842.tar.bz2
dsub-0ef10171df111bfa8510e569f4bc939e64beb842.zip
Use localized byte formats
-rw-r--r--src/github/daneren2005/dsub/fragments/MainFragment.java8
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java2
-rw-r--r--src/github/daneren2005/dsub/util/Notifications.java2
3 files changed, 6 insertions, 6 deletions
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";