aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-02-03 00:02:09 +0100
committerChristian Schneppe <christian@pix-art.de>2018-02-03 00:03:37 +0100
commit282612a0612fac5eb9ced648b3d8969bff85c90c (patch)
tree95abdf82be642106f018a11a8de8ebdf5e7b101b
parent82732be0dafeb8cea0c8a3dedecdaaf1906cde34 (diff)
finish() SettingsActivity in onPause
and revert 82732be0dafeb8cea0c8a3dedecdaaf1906cde34
-rw-r--r--src/main/java/de/pixart/messenger/ui/SettingsActivity.java19
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();
+ }
}