am 6c84343f: Merge change 4119 into donut
Merge commit '6c84343f0794c368e79c58b715ffad268b8e219c' * commit '6c84343f0794c368e79c58b715ffad268b8e219c': Use locale-appropriate formatting to display application sizes like "252KB".
This commit is contained in:
committed by
The Android Open Source Project
commit
54c1c1908a
@@ -59,9 +59,15 @@ public final class Formatter {
|
||||
result = result / 1024;
|
||||
}
|
||||
if (result < 100) {
|
||||
return String.format("%.2f%s", result, context.getText(suffix).toString());
|
||||
String value = String.format("%.2f", result);
|
||||
return context.getResources().
|
||||
getString(com.android.internal.R.string.fileSizeSuffix,
|
||||
value, context.getString(suffix));
|
||||
}
|
||||
return String.format("%.0f%s", result, context.getText(suffix).toString());
|
||||
String value = String.format("%.0f", result);
|
||||
return context.getResources().
|
||||
getString(com.android.internal.R.string.fileSizeSuffix,
|
||||
value, context.getString(suffix));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user