diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-08-11 15:29:30 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-08-11 15:29:30 +0200 |
commit | a1a09ff057ed9aa0e29be588c53d33355d4d6ec4 (patch) | |
tree | 58e3f4f39c4524250c6fabf5fb8f7c1479b42aed /src/main/java/eu/siacs/conversations/ui/SettingsActivity.java | |
parent | eac4bf7d902dc2579983daa29bcb74ca14790de6 (diff) |
Compile Clean after mergetrz/merge_1.5.2
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/SettingsActivity.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/SettingsActivity.java | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java index d12ff4f2..c020cb1f 100644 --- a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java @@ -133,28 +133,28 @@ public class SettingsActivity extends XmppActivity implements @Override public void onSharedPreferenceChanged(SharedPreferences preferences, String name) { - // need to synchronize the settings class first - Settings.synchronizeSettingsClassWithPreferences(getPreferences(), name); - switch (name) { - case "resource": - String resource = preferences.getString("resource", "mobile") - .toLowerCase(Locale.US); - if (xmppConnectionServiceBound) { - for (Account account : xmppConnectionService.getAccounts()) { - account.setResource(resource); - if (!account.isOptionSet(Account.OPTION_DISABLED)) { - XmppConnection connection = account.getXmppConnection(); + // need to synchronize the settings class first + Settings.synchronizeSettingsClassWithPreferences(getPreferences(), name); + switch (name) { + case "resource": + String resource = preferences.getString("resource", "mobile") + .toLowerCase(Locale.US); + if (xmppConnectionServiceBound) { + for (Account account : xmppConnectionService.getAccounts()) { + account.setResource(resource); + if (!account.isOptionSet(Account.OPTION_DISABLED)) { + XmppConnection connection = account.getXmppConnection(); if (connection != null) { connection.resetStreamId(); } - xmppConnectionService.reconnectAccountInBackground(account); - } - } - } - break; - case "keep_foreground_service": - xmppConnectionService.toggleForegroundService(); - break; + xmppConnectionService.reconnectAccountInBackground(account); + } + } + } + break; + case "keep_foreground_service": + xmppConnectionService.toggleForegroundService(); + break; case "confirm_messages": if (xmppConnectionServiceBound) { for (Account account : xmppConnectionService.getAccounts()) { @@ -164,11 +164,12 @@ public class SettingsActivity extends XmppActivity implements } } break; - case "dont_trust_system_cas": - xmppConnectionService.updateMemorizingTrustmanager(); - reconnectAccounts(); - break; - } + case "dont_trust_system_cas": + xmppConnectionService.updateMemorizingTrustmanager(); + reconnectAccounts(); + break; + } + } private void displayToast(final String msg) { runOnUiThread(new Runnable() { @@ -186,6 +187,5 @@ public class SettingsActivity extends XmppActivity implements } } } - } } |