diff options
author | Parménides GV <parmegv@sdf.org> | 2013-07-25 18:38:21 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-07-25 18:38:21 +0200 |
commit | 011906a4062c4169e343fbdf72ad75491caa1767 (patch) | |
tree | c00e8a4ef4af19bfa56b28af69201944f777e9e8 /src | |
parent | 972bcbf3c848093410732e3d9b41951984da0338 (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/se/leap/leapclient/Dashboard.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 4c9c28dd..67a73c44 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(); } } |