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
committerMatt Wagantall <mwagantall@cyngn.com>2016-02-19 14:07:44 -0800
commitae7d8f71276ad27319efe9030c0a1f381802cd13 (patch)
tree8552595630c6149b61db3d884ebfdb535528c138 /fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
parent755c888c46e72bd7f41da5085be9a9699283bcf5 (diff)
downloadandroid_hardware_qcom_fm-ae7d8f71276ad27319efe9030c0a1f381802cd13.tar.gz
android_hardware_qcom_fm-ae7d8f71276ad27319efe9030c0a1f381802cd13.tar.bz2
android_hardware_qcom_fm-ae7d8f71276ad27319efe9030c0a1f381802cd13.zip
FM: always use overlay default country
Change-Id: I2acbbde684e7581124577f6e929397279d97cb41 (cherry picked from commit 087fb5a9128f8a9d96289815b1ae4be2ea98981a)
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 e581a81..cc5ccbf 100644
--- a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
+++ b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
@@ -171,6 +171,8 @@ public class FmSharedPreferences
private static int mLastAudioMode = -1;
private static boolean mSpecialCarrierFlag = false;
+ public static int mDefaultCountryIndex = REGIONAL_BAND_NORTH_AMERICA;
+
FmSharedPreferences(Context context){
mContext = context.getApplicationContext();
mFMConfiguration = new FmConfig();
@@ -507,8 +509,8 @@ public class FmSharedPreferences
.getBoolean(R.bool.def_fm_country_location_enabled)) {
setCountry(sp.getInt(FMCONFIG_COUNTRY, REGIONAL_BAND_INDIA));
} 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);
@@ -582,7 +584,7 @@ public class FmSharedPreferences
setCountry(REGIONAL_BAND_CHINA);
//Others set north America.
} else {
- setCountry(REGIONAL_BAND_NORTH_AMERICA);
+ setCountry(mDefaultCountryIndex);
}
}