Commit 868cd66a authored by fallenstardust's avatar fallenstardust

版本号判断改为文本比较大小

parent 0ca0f295
...@@ -388,7 +388,6 @@ public class AppsSettings { ...@@ -388,7 +388,6 @@ public class AppsSettings {
*/ */
public int getDataLanguage() { public int getDataLanguage() {
try { try {
Log.i(BuildConfig.VERSION_NAME, mSharedPreferences.getString(Constants.PREF_DATA_LANGUAGE, "" + PREF_DEF_DATA_LANGUAGE));
return Integer.valueOf(mSharedPreferences.getString(Constants.PREF_DATA_LANGUAGE, "" + PREF_DEF_DATA_LANGUAGE)); return Integer.valueOf(mSharedPreferences.getString(Constants.PREF_DATA_LANGUAGE, "" + PREF_DEF_DATA_LANGUAGE));
} catch (Exception e) { } catch (Exception e) {
return PREF_DEF_DATA_LANGUAGE; return PREF_DEF_DATA_LANGUAGE;
......
...@@ -190,7 +190,7 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat ...@@ -190,7 +190,7 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
if (!TextUtils.isEmpty(Cache_pre_release_code)) { if (!TextUtils.isEmpty(Cache_pre_release_code)) {
arrangeCodeList(Cache_pre_release_code);//转换成两个数组 arrangeCodeList(Cache_pre_release_code);//转换成两个数组
} }
if (!Version.equals(BuildConfig.VERSION_NAME) && !TextUtils.isEmpty(Version) && !TextUtils.isEmpty(Cache_link)) { if (Version.compareTo(BuildConfig.VERSION_NAME) > 0 && !TextUtils.isEmpty(Version) && !TextUtils.isEmpty(Cache_link)) {
DialogPlus dialog = new DialogPlus(getActivity()); DialogPlus dialog = new DialogPlus(getActivity());
dialog.setMessage(R.string.Found_Update); dialog.setMessage(R.string.Found_Update);
dialog.setLeftButtonText(R.string.download_home); dialog.setLeftButtonText(R.string.download_home);
......
...@@ -269,7 +269,7 @@ public class SettingFragment extends PreferenceFragmentPlus { ...@@ -269,7 +269,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
if (!TextUtils.isEmpty(Cache_pre_release_code)) { if (!TextUtils.isEmpty(Cache_pre_release_code)) {
arrangeCodeList(Cache_pre_release_code);//转换成两个数组 arrangeCodeList(Cache_pre_release_code);//转换成两个数组
} }
if (!Version.equals(BuildConfig.VERSION_NAME) && !TextUtils.isEmpty(Version) && !TextUtils.isEmpty(Cache_link)) { if (Version.compareTo(BuildConfig.VERSION_NAME) > 0 && !TextUtils.isEmpty(Version) && !TextUtils.isEmpty(Cache_link)) {
DialogPlus dialog = new DialogPlus(getActivity()); DialogPlus dialog = new DialogPlus(getActivity());
dialog.setMessage(R.string.Found_Update); dialog.setMessage(R.string.Found_Update);
dialog.setLeftButtonText(R.string.download_home); dialog.setLeftButtonText(R.string.download_home);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment