From 011906a4062c4169e343fbdf72ad75491caa1767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 25 Jul 2013 18:38:21 +0200 Subject: Login progressdialog get dismissed when finished. If login is successful, dialog is dismissed and toast is showed. If login is not successful and the user cancels the new login dialog presented to him/her, then Dashboard is showed. --- src/se/leap/leapclient/Dashboard.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 4c9c28d..67a73c4 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -299,6 +299,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf Cookie session_id = new BasicClientCookie(session_id_cookie_key, session_id_string); downloadAuthedUserCertificate(session_id); } else if(resultCode == ConfigHelper.SRP_AUTHENTICATION_FAILED) { + mProgressDialog.dismiss(); logInDialog(getCurrentFocus(), resultData.getString(getResources().getString(R.string.user_message))); } else if(resultCode == ConfigHelper.LOGOUT_SUCCESSFUL) { authed = false; @@ -310,10 +311,12 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf mProgressDialog.dismiss(); Toast.makeText(getApplicationContext(), R.string.log_out_failed_message, Toast.LENGTH_LONG).show(); } else if(resultCode == ConfigHelper.CORRECTLY_DOWNLOADED_CERTIFICATE) { - setResult(RESULT_CANCELED); + setResult(RESULT_OK); + mProgressDialog.dismiss(); Toast.makeText(getApplicationContext(), R.string.successful_authed_cert_downloaded_message, Toast.LENGTH_LONG).show(); } else if(resultCode == ConfigHelper.INCORRECTLY_DOWNLOADED_CERTIFICATE) { setResult(RESULT_CANCELED); + mProgressDialog.dismiss(); Toast.makeText(getApplicationContext(), R.string.authed_cert_download_failed_message, Toast.LENGTH_LONG).show(); } } -- cgit v1.2.3