diff options
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/SettingsActivity.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java index 1f55b6928..b519cf5e4 100644 --- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java @@ -92,16 +92,14 @@ public class SettingsActivity extends XmppActivity implements //this feature is only available on Huawei Android 6. PreferenceScreen huaweiPreferenceScreen = (PreferenceScreen) mSettingsFragment.findPreference("huawei"); - Intent intent; - if (huaweiPreferenceScreen.getIntent() != null) { - intent = huaweiPreferenceScreen.getIntent(); - //remove when Api version is above M (Version 6.0) or if the intent is not callable - if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M || !isCallable(intent)) { - PreferenceCategory generalCategory = (PreferenceCategory) mSettingsFragment.findPreference("general"); - generalCategory.removePreference(huaweiPreferenceScreen); - } + Intent intent = huaweiPreferenceScreen.getIntent(); + //remove when Api version is above M (Version 6.0) or if the intent is not callable + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M || !isCallable(intent)) { + PreferenceCategory generalCategory = (PreferenceCategory) mSettingsFragment.findPreference("general"); + generalCategory.removePreference(huaweiPreferenceScreen); } + if (BuildConfig.FLAVOR != "open") { PreferenceCategory connectionOptions = (PreferenceCategory) mSettingsFragment.findPreference("connection_options"); PreferenceScreen expert = (PreferenceScreen) mSettingsFragment.findPreference("expert"); @@ -344,4 +342,9 @@ public class SettingsActivity extends XmppActivity implements //nothing to do. This Activity doesn't implement any listeners } + @Override + public void onPause() { + super.onPause(); + finish(); + } } |