diff options
-rw-r--r-- | src/se/leap/leapclient/ConfigHelper.java | 3 | ||||
-rw-r--r-- | src/se/leap/leapclient/ConfigurationWizard.java | 8 | ||||
-rw-r--r-- | src/se/leap/leapclient/Dashboard.java | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/se/leap/leapclient/ConfigHelper.java b/src/se/leap/leapclient/ConfigHelper.java index 559c8e0..acc4888 100644 --- a/src/se/leap/leapclient/ConfigHelper.java +++ b/src/se/leap/leapclient/ConfigHelper.java @@ -80,7 +80,8 @@ public class ConfigHelper { PROVIDER_DETAILS_DIALOG = "providerDetailsFragment", DOMAIN = "domain", NAME = "name", - DESCRIPTION = "description" + DESCRIPTION = "description", + QUIT = "quit" ; final public static String NG_1024 = diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index cd367bc..a9fac09 100644 --- a/src/se/leap/leapclient/ConfigurationWizard.java +++ b/src/se/leap/leapclient/ConfigurationWizard.java @@ -148,6 +148,14 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn mSelectedProvider = selected_provider;
saveProviderJson(mSelectedProvider);
}
+
+ @Override
+ public void onBackPressed() {
+ Intent ask_quit = new Intent();
+ ask_quit.putExtra(ConfigHelper.QUIT, ConfigHelper.QUIT);
+ setResult(RESULT_CANCELED, ask_quit);
+ super.onBackPressed();
+ }
private ProviderItem getProvider(String id) {
Iterator<ProviderItem> providers_iterator = ProviderListContent.ITEMS.iterator();
diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 1e7fbf6..93963b3 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -103,6 +103,8 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf View view = ((ViewGroup)findViewById(android.R.id.content)).getChildAt(0); logInDialog(view); } + } else if(resultCode == RESULT_CANCELED && data.hasExtra(ConfigHelper.QUIT)) { + finish(); } else configErrorDialog(); } |