diff options
Diffstat (limited to 'src/com/android/providers/downloads/DownloadNotifier.java')
-rw-r--r-- | src/com/android/providers/downloads/DownloadNotifier.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/providers/downloads/DownloadNotifier.java b/src/com/android/providers/downloads/DownloadNotifier.java index 0fb5a583..3af97463 100644 --- a/src/com/android/providers/downloads/DownloadNotifier.java +++ b/src/com/android/providers/downloads/DownloadNotifier.java @@ -43,6 +43,7 @@ import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; +import java.text.NumberFormat; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; @@ -221,8 +222,8 @@ public class DownloadNotifier { } if (total > 0) { - final int percent = (int) ((current * 100) / total); - percentText = res.getString(R.string.download_percent, percent); + percentText = + NumberFormat.getPercentInstance().format((double) current / total); if (speed > 0) { final long remainingMillis = ((total - current) * 1000) / speed; @@ -248,6 +249,7 @@ public class DownloadNotifier { speedAsSizeText = Formatter.formatFileSize(mContext, speed); } + final int percent = (int) ((current * 100) / total); builder.setProgress(100, percent, false); } else { builder.setProgress(100, 0, true); |