From 820a0d01810dd0bfe6d75c873ced88f2cd0b9509 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 3 May 2013 10:24:17 +0200 Subject: Cancel dialog when pressing back (closes issue #167) --- src/de/blinkt/openvpn/api/ConfirmDialog.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/de/blinkt/openvpn/api/ConfirmDialog.java b/src/de/blinkt/openvpn/api/ConfirmDialog.java index dfd01884..55c6e906 100644 --- a/src/de/blinkt/openvpn/api/ConfirmDialog.java +++ b/src/de/blinkt/openvpn/api/ConfirmDialog.java @@ -98,6 +98,8 @@ CompoundButton.OnCheckedChangeListener, DialogInterface.OnClickListener { @Override public void onBackPressed() { + setResult(RESULT_CANCELED); + finish(); } @Override @@ -116,6 +118,7 @@ CompoundButton.OnCheckedChangeListener, DialogInterface.OnClickListener { } if (which == DialogInterface.BUTTON_NEGATIVE) { + setResult(RESULT_CANCELED); finish(); } } -- cgit v1.2.3