diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2013-09-06 11:09:14 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-09-06 11:09:14 -0700 |
commit | 579a41a7aa79a0bdb94faeb8620098ccd0cd372d (patch) | |
tree | 645735e1c6c610b025bc453ec61b36d185cfcd52 /fmapp | |
parent | a1e94f8dd88eca2389fad4d74a57ff2f094eddcf (diff) | |
parent | f304f7b836d88bd381a07c4995e4bf8f5949482b (diff) | |
download | android_hardware_qcom_fm-579a41a7aa79a0bdb94faeb8620098ccd0cd372d.tar.gz android_hardware_qcom_fm-579a41a7aa79a0bdb94faeb8620098ccd0cd372d.tar.bz2 android_hardware_qcom_fm-579a41a7aa79a0bdb94faeb8620098ccd0cd372d.zip |
Merge "FM: Fix default band is incorrect when language is chinese"
Diffstat (limited to 'fmapp')
-rw-r--r-- | fmapp/src/com/codeaurora/fmradio/FmSharedPreferences.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fmapp/src/com/codeaurora/fmradio/FmSharedPreferences.java b/fmapp/src/com/codeaurora/fmradio/FmSharedPreferences.java index 247969c..7fcb6a5 100644 --- a/fmapp/src/com/codeaurora/fmradio/FmSharedPreferences.java +++ b/fmapp/src/com/codeaurora/fmradio/FmSharedPreferences.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.ListIterator; +import java.util.Locale; import java.util.Map; import android.content.Context; @@ -497,7 +498,11 @@ public class FmSharedPreferences } } /* Load Configuration */ - setCountry(sp.getInt(FMCONFIG_COUNTRY, 0)); + if (Locale.getDefault().equals(Locale.CHINA)) { + setCountry(sp.getInt(FMCONFIG_COUNTRY, REGIONAL_BAND_CHINA)); + } else { + setCountry(sp.getInt(FMCONFIG_COUNTRY, REGIONAL_BAND_NORTH_AMERICA)); + } /* Last list the user was navigating */ mListIndex = sp.getInt(LAST_LIST_INDEX, 0); if(mListIndex >= num_lists) @@ -565,13 +570,12 @@ public class FmSharedPreferences public static void SetDefaults() { mListIndex=0; mListOfPlists.clear(); - setCountry(REGIONAL_BAND_NORTH_AMERICA); - setRadioBand(0); - setChSpacing(0); - setEmphasis(0); - setRdsStd(0); - mFMConfiguration.setLowerLimit(87500); - mFMConfiguration.setUpperLimit(107900); + if (Locale.getDefault().equals(Locale.CHINA)){ + setCountry(REGIONAL_BAND_CHINA); + //Others set north America. + } else { + setCountry(REGIONAL_BAND_NORTH_AMERICA); + } } public static void removeStationList(int listIndex) { |