diff options
author | Parménides GV <parmegv@sdf.org> | 2013-11-07 11:09:40 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-12-10 18:16:07 +0100 |
commit | 8abbfb678433c9033674db2c53070a01aa3a16a0 (patch) | |
tree | 9dab1168c145d6ddb5fdeab0a626e69532177d52 /src/se/leap/bitmaskclient/DownloadFailedDialog.java | |
parent | 0bcf72490f726825121e355afbeaf5b14636eb4d (diff) |
Not added item is removed after canceling dialog.
Diffstat (limited to 'src/se/leap/bitmaskclient/DownloadFailedDialog.java')
-rw-r--r-- | src/se/leap/bitmaskclient/DownloadFailedDialog.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/se/leap/bitmaskclient/DownloadFailedDialog.java b/src/se/leap/bitmaskclient/DownloadFailedDialog.java index 72455b2f..b759b1a3 100644 --- a/src/se/leap/bitmaskclient/DownloadFailedDialog.java +++ b/src/se/leap/bitmaskclient/DownloadFailedDialog.java @@ -18,6 +18,7 @@ import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.NewProviderDialog.NewProviderDialogInterface; +import se.leap.bitmaskclient.ProviderListContent.ProviderItem; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; @@ -57,6 +58,11 @@ public class DownloadFailedDialog extends DialogFragment { }) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { + ConfigHelper.removeFromSharedPref(Provider.KEY); + ConfigHelper.removeFromSharedPref(ProviderItem.DANGER_ON); + ConfigHelper.removeFromSharedPref(EIP.ALLOWED_ANON); + ConfigHelper.removeFromSharedPref(EIP.KEY); + interface_with_ConfigurationWizard.removeLastProviderItem(); dialog.dismiss(); } }); @@ -67,6 +73,7 @@ public class DownloadFailedDialog extends DialogFragment { public interface DownloadFailedDialogInterface { public void retrySetUpProvider(); + public void removeLastProviderItem(); } DownloadFailedDialogInterface interface_with_ConfigurationWizard; |