Radio and Dual SIM - RU - Decimal comma required
[Modify]
Use a decimal comma (,) instead of a decimal period(.) when
showing frequency throughout the application.
from: https://partner-android-review.googlesource.com/#/c/201685/
Bug:19206785
Change-Id: Ib98725442186dad65b0acd93ec61798024b8413a
Signed-off-by: Tony Kuo <tony.kuo@mediatek.com>
diff --git a/src/com/android/fmradio/FmUtils.java b/src/com/android/fmradio/FmUtils.java
index bff60fa..608ced7 100644
--- a/src/com/android/fmradio/FmUtils.java
+++ b/src/com/android/fmradio/FmUtils.java
@@ -29,6 +29,7 @@
import android.widget.LinearLayout;
import android.widget.TextView;
+import java.text.DecimalFormat;
import java.util.Locale;
/**
@@ -138,9 +139,8 @@
*/
public static String formatStation(int station) {
float frequency = (float) station / CONVERT_RATE;
- String result = String.format(Locale.ENGLISH, "%.1f",
- Float.valueOf(frequency));
- return result;
+ DecimalFormat decimalFormat = new DecimalFormat("0.0");
+ return decimalFormat.format(frequency);
}
/**