summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/se/leap/bitmaskclient/Dashboard.java3
-rw-r--r--src/se/leap/bitmaskclient/EipServiceFragment.java6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/se/leap/bitmaskclient/Dashboard.java b/src/se/leap/bitmaskclient/Dashboard.java
index 4ad6d029..b8d76f87 100644
--- a/src/se/leap/bitmaskclient/Dashboard.java
+++ b/src/se/leap/bitmaskclient/Dashboard.java
@@ -375,7 +375,8 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf
setResult(RESULT_OK);
changeStatusMessage(resultCode);
mProgressBar.setVisibility(ProgressBar.GONE);
- eipStart();
+ if(EipServiceFragment.isEipSwitchChecked())
+ eipStart();
} else if(resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE) {
setResult(RESULT_CANCELED);
changeStatusMessage(resultCode);
diff --git a/src/se/leap/bitmaskclient/EipServiceFragment.java b/src/se/leap/bitmaskclient/EipServiceFragment.java
index 318e4024..bae1b942 100644
--- a/src/se/leap/bitmaskclient/EipServiceFragment.java
+++ b/src/se/leap/bitmaskclient/EipServiceFragment.java
@@ -29,7 +29,7 @@ public class EipServiceFragment extends Fragment implements StateListener, OnChe
private static final String IS_EIP_PENDING = "is_eip_pending";
private View eipFragment;
- private Switch eipSwitch;
+ private static Switch eipSwitch;
private View eipDetail;
private TextView eipStatus;
@@ -278,4 +278,8 @@ public class EipServiceFragment extends Fragment implements StateListener, OnChe
public static EIPReceiver getReceiver() {
return mEIPReceiver;
}
+
+ public static boolean isEipSwitchChecked() {
+ return eipSwitch.isChecked();
+ }
}