From 1790250865f8c017745591f4d35823d33d62047f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 24 Mar 2014 20:20:41 +0100 Subject: After logging in, eip starts. Now we need to start eip only if the eip switch is on. --- src/se/leap/bitmaskclient/Dashboard.java | 9 +++++++++ src/se/leap/bitmaskclient/EipServiceFragment.java | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src/se/leap') diff --git a/src/se/leap/bitmaskclient/Dashboard.java b/src/se/leap/bitmaskclient/Dashboard.java index aa3cd4d9..4ad6d029 100644 --- a/src/se/leap/bitmaskclient/Dashboard.java +++ b/src/se/leap/bitmaskclient/Dashboard.java @@ -375,6 +375,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf setResult(RESULT_OK); changeStatusMessage(resultCode); mProgressBar.setVisibility(ProgressBar.GONE); + eipStart(); } else if(resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE) { setResult(RESULT_CANCELED); changeStatusMessage(resultCode); @@ -462,4 +463,12 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf startService(eip_intent); } + + private void eipStart(){ + Intent eip_intent = new Intent(this, EIP.class); + eip_intent.setAction(EIP.ACTION_START_EIP); + eip_intent.putExtra(EIP.RECEIVER_TAG, EipServiceFragment.getReceiver()); + startService(eip_intent); + + } } diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java index c2849bbd..318e4024 100644 --- a/src/se/leap/bitmaskclient/EipServiceFragment.java +++ b/src/se/leap/bitmaskclient/EipServiceFragment.java @@ -37,7 +37,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnChe private boolean mEipStartPending = false; - private EIPReceiver mEIPReceiver; + private static EIPReceiver mEIPReceiver; public static String TAG = "se.leap.bitmask.EipServiceFragment"; @@ -273,4 +273,9 @@ public class EipServiceFragment extends Fragment implements StateListener, OnChe eipAutoSwitched = false; } } + + + public static EIPReceiver getReceiver() { + return mEIPReceiver; + } } -- cgit v1.2.3