summaryrefslogtreecommitdiffstats
path: root/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
diff options
context:
space:
mode:
authorEdward Wang <ewang@cyngn.com>2015-04-09 17:22:50 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-04-10 22:20:48 +0000
commit087fb5a9128f8a9d96289815b1ae4be2ea98981a (patch)
tree7cdc7054c8dbe70284e5babfd6ca0ff751cce676 /fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
parent4b86c869026d6ef7504d2cecca4c3db9fa9d8c4b (diff)
downloadandroid_hardware_qcom_fm-087fb5a9128f8a9d96289815b1ae4be2ea98981a.tar.gz
android_hardware_qcom_fm-087fb5a9128f8a9d96289815b1ae4be2ea98981a.tar.bz2
android_hardware_qcom_fm-087fb5a9128f8a9d96289815b1ae4be2ea98981a.zip
FM: always use overlay default country
Change-Id: I2acbbde684e7581124577f6e929397279d97cb41
Diffstat (limited to 'fmapp2/src/com/caf/fmradio/FmSharedPreferences.java')
-rw-r--r--fmapp2/src/com/caf/fmradio/FmSharedPreferences.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
index 3302daf..4028455 100644
--- a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
+++ b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
@@ -169,6 +169,8 @@ public class FmSharedPreferences
private static int mRecordDuration = 0;
private static int mLastAudioMode = -1;
+ public static int mDefaultCountryIndex = REGIONAL_BAND_NORTH_AMERICA;
+
FmSharedPreferences(Context context){
mContext = context.getApplicationContext();
mFMConfiguration = new FmConfig();
@@ -500,8 +502,8 @@ public class FmSharedPreferences
if (Locale.getDefault().equals(Locale.CHINA)) {
setCountry(sp.getInt(FMCONFIG_COUNTRY, REGIONAL_BAND_CHINA));
} else {
- int defaultIndex = mContext.getResources().getInteger(R.integer.default_country_index);
- setCountry(sp.getInt(FMCONFIG_COUNTRY, defaultIndex));
+ mDefaultCountryIndex = mContext.getResources().getInteger(R.integer.default_country_index);
+ setCountry(sp.getInt(FMCONFIG_COUNTRY, mDefaultCountryIndex));
}
/* Last list the user was navigating */
mListIndex = sp.getInt(LAST_LIST_INDEX, 0);
@@ -575,7 +577,7 @@ public class FmSharedPreferences
setCountry(REGIONAL_BAND_CHINA);
//Others set north America.
} else {
- setCountry(REGIONAL_BAND_NORTH_AMERICA);
+ setCountry(mDefaultCountryIndex);
}
}