From 7d8e1bded64fc6186eb2179ed566f5347e2f5f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Sat, 29 Jun 2013 17:30:40 +0200 Subject: Login dialog appears after a failed login. If the user enters his/her password incorrectly, the dialog appears again. --- src/se/leap/leapclient/Dashboard.java | 5 ++--- src/se/leap/openvpn/AboutFragment.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/se/leap') diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 93963b3..f63649d 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -68,8 +68,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf setContentView(R.layout.client_dashboard); ConfigHelper.setSharedPreferences(getSharedPreferences(ConfigHelper.PREFERENCES_KEY, MODE_PRIVATE)); - if(ConfigHelper.shared_preferences == null) - ConfigHelper.setSharedPreferences(preferences); + preferences = ConfigHelper.shared_preferences; if (ConfigHelper.getStringFromSharedPref(ConfigHelper.PROVIDER_KEY).isEmpty()) startActivityForResult(new Intent(this,ConfigurationWizard.class),CONFIGURE_LEAP); @@ -374,7 +373,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) { - setResult(RESULT_CANCELED); + logInDialog(getCurrentFocus()); Toast.makeText(getApplicationContext(), R.string.authentication_failed_message, Toast.LENGTH_LONG).show(); } else if(resultCode == ConfigHelper.LOGOUT_SUCCESSFUL) { setResult(RESULT_OK); diff --git a/src/se/leap/openvpn/AboutFragment.java b/src/se/leap/openvpn/AboutFragment.java index 4f9f9f2..235216e 100644 --- a/src/se/leap/openvpn/AboutFragment.java +++ b/src/se/leap/openvpn/AboutFragment.java @@ -16,8 +16,8 @@ import se.leap.leapclient.R; public class AboutFragment extends Fragment { public static Fragment newInstance() { - AboutFragment instance = new AboutFragment(); - return instance; + AboutFragment provider_detail_fragment = new AboutFragment(); + return provider_detail_fragment; } @Override -- cgit v1.2.3