summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-11-11 23:28:24 +0100
committerArne Schwabe <arne@rfc2549.org>2014-11-11 23:28:24 +0100
commitddec52f3556172813bf1df71aeda33ef20e9822e (patch)
tree1e8befa88e8ec618852ef083fedf06f64c527b01
parent3ebb2e2ae877a9b22bf2a97b0e6c4853d9f79078 (diff)
Fix back button on DisconnectDialog doing strange things
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java b/main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java
index b8943e10..905180e8 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/DisconnectVPN.java
@@ -17,7 +17,7 @@ import de.blinkt.openvpn.core.ProfileManager;
/**
* Created by arne on 13.10.13.
*/
-public class DisconnectVPN extends Activity implements DialogInterface.OnClickListener{
+public class DisconnectVPN extends Activity implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
protected OpenVPNService mService;
private ServiceConnection mConnection = new ServiceConnection() {
@@ -71,6 +71,7 @@ public class DisconnectVPN extends Activity implements DialogInterface.OnClickLi
builder.setMessage(R.string.cancel_connection_query);
builder.setNegativeButton(android.R.string.no, this);
builder.setPositiveButton(android.R.string.yes,this);
+ builder.setOnCancelListener(this);
builder.show();
}
@@ -84,4 +85,9 @@ public class DisconnectVPN extends Activity implements DialogInterface.OnClickLi
}
finish();
}
+
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ finish();
+ }
}