aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java1
-rw-r--r--src/eu/siacs/conversations/ui/XmppActivity.java9
2 files changed, 8 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 157b8175..70d5fc03 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -619,6 +619,7 @@ public class XmppConnectionService extends Service {
@Override
public void onDestroy() {
+ Log.d(LOGTAG,"stopping service");
super.onDestroy();
for (Account account : accounts) {
if (account.getXmppConnection() != null) {
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java
index 1f9c678a..70c4614d 100644
--- a/src/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/eu/siacs/conversations/ui/XmppActivity.java
@@ -95,8 +95,12 @@ public abstract class XmppActivity extends Activity {
@Override
public void onClick(DialogInterface dialog, int which) {
- // TODO Auto-generated method stub
-
+ if (xmppConnectionServiceBound) {
+ unbindService(mConnection);
+ xmppConnectionServiceBound = false;
+ }
+ stopService(new Intent(XmppActivity.this, XmppConnectionService.class));
+ finish();
}
});
builder.setPositiveButton(getString(R.string.install), new OnClickListener() {
@@ -106,6 +110,7 @@ public abstract class XmppActivity extends Activity {
Uri uri = Uri.parse("market://details?id=org.sufficientlysecure.keychain");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
+ finish();
}
});
builder.create().show();