mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 08:09:12 +01:00
Compare against existing Build.VERSION_CODES.
The 1.X Android versions don't have the 2.X VERSION_CODE symbols, so comparing against them in order to make 1.6 choices will throw runtime exceptions.
This commit is contained in:
@@ -77,7 +77,7 @@ public class ApplicationPreferencesActivity extends PreferenceActivity {
|
||||
super.onCreate(icicle);
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ECLAIR) {
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.DONUT) {
|
||||
CheckBoxPreference mmsPreference = (CheckBoxPreference)this.findPreference("pref_all_mms");
|
||||
mmsPreference.setChecked(false);
|
||||
mmsPreference.setEnabled(false);
|
||||
@@ -133,7 +133,7 @@ public class ApplicationPreferencesActivity extends PreferenceActivity {
|
||||
}
|
||||
|
||||
public static boolean showIcon() {
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR;
|
||||
return Build.VERSION.SDK_INT > Build.VERSION_CODES.DONUT;
|
||||
}
|
||||
|
||||
private void handleIdentitySelection(Intent data) {
|
||||
|
||||
Reference in New Issue
Block a user