aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java9
-rw-r--r--src/main/res/menu/editaccount.xml5
2 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index c8d88b308..57d3f9550 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -618,6 +618,15 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getItemId()) {
+ case R.id.mgmt_account_reconnect:
+ if (xmppConnectionServiceBound) {
+ unbindService(mConnection);
+ xmppConnectionServiceBound = false;
+ }
+ stopService(new Intent(EditAccountActivity.this,
+ XmppConnectionService.class));
+ finish();
+ break;
case R.id.action_show_block_list:
final Intent showBlocklistIntent = new Intent(this, BlocklistActivity.class);
showBlocklistIntent.putExtra(EXTRA_ACCOUNT, mAccount.getJid().toString());
diff --git a/src/main/res/menu/editaccount.xml b/src/main/res/menu/editaccount.xml
index 3e449007b..509bd9532 100644
--- a/src/main/res/menu/editaccount.xml
+++ b/src/main/res/menu/editaccount.xml
@@ -41,7 +41,10 @@
android:showAsAction="always"
android:icon="?attr/icon_edit"
android:title="@string/change_password"/>
-
+ <item
+ android:id="@+id/mgmt_account_reconnect"
+ android:showAsAction="never"
+ android:title="@string/mgmt_account_reconnect"/>
<item
android:id="@+id/action_clear_devices"
android:showAsAction="never"