summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-03-24 20:20:41 +0100
committerParménides GV <parmegv@sdf.org>2014-04-02 15:39:51 +0200
commit1790250865f8c017745591f4d35823d33d62047f (patch)
treef1b3e0d1dcb91632391427c5f6614cec40bea443
parent1baf6675aaeea3aee46f3e2d2709ab2bc9579113 (diff)
After logging in, eip starts.
Now we need to start eip only if the eip switch is on.
-rw-r--r--src/se/leap/bitmaskclient/Dashboard.java9
-rw-r--r--src/se/leap/bitmaskclient/EipServiceFragment.java7
2 files changed, 15 insertions, 1 deletions
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;
+ }
}