From 73a18a778abdfd8010c8b7609c99b825cc1554d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 27 Jun 2013 21:52:54 +0200 Subject: Login button from ProviderDetailFragment works. I return an intent with ConfigHelper.LOG_IN extra present. Dashboard looks for it, and if found, starts LogInDialog. --- src/se/leap/leapclient/ConfigurationWizard.java | 5 ++++- src/se/leap/leapclient/Dashboard.java | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index 7f29a40..7cf989a 100644 --- a/src/se/leap/leapclient/ConfigurationWizard.java +++ b/src/se/leap/leapclient/ConfigurationWizard.java @@ -332,7 +332,10 @@ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogIn @Override public void login() { - //TODO Start dashboard and show login dialog + Intent ask_login = new Intent(); + ask_login.putExtra(ConfigHelper.LOG_IN, ConfigHelper.LOG_IN); + setResult(RESULT_OK, ask_login); + finish(); } @Override diff --git a/src/se/leap/leapclient/Dashboard.java b/src/se/leap/leapclient/Dashboard.java index 3c9df56..96b982f 100644 --- a/src/se/leap/leapclient/Dashboard.java +++ b/src/se/leap/leapclient/Dashboard.java @@ -88,6 +88,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf @Override protected void onResume() { super.onResume(); + if (provider != null) if (provider.hasEIP() && provider.getEIPType() == "OpenVPN") OpenVPN.addStateListener(this); @@ -98,6 +99,10 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf if ( requestCode == CONFIGURE_LEAP ) { if ( resultCode == RESULT_OK ){ buildDashboard(); + if(data != null && data.hasExtra(ConfigHelper.LOG_IN)) { + View view = ((ViewGroup)findViewById(android.R.id.content)).getChildAt(0); + logInDialog(view); + } } else configErrorDialog(); } -- cgit v1.2.3