diff options
Diffstat (limited to 'fmapp2/src/com/caf/fmradio/FmSharedPreferences.java')
-rw-r--r-- | fmapp2/src/com/caf/fmradio/FmSharedPreferences.java | 8 |
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); } } |