summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-02-22 12:23:33 +0100
committerFup Duck <fupduck@sacknagel.com>2018-02-22 12:23:33 +0100
commit0f5a0510aa83872417467914ad52aa3d0d663f51 (patch)
tree53d1b8004288a0b071afdf97e24906d2f704d365 /app/src/main
parentaf3ac0476f2b6320cd3e3ff8e17453d50bbace08 (diff)
8865 - allow disconnect without internet
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipFragment.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
index 8d1fa03a..4d28315f 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
@@ -171,8 +171,8 @@ public class EipFragment extends Fragment implements Observer {
super.onResume();
//FIXME: avoid race conditions while checking certificate an logging in at about the same time
//eipCommand(Constants.EIP_ACTION_CHECK_CERT_VALIDITY);
- handleNewState();
bindOpenVpnService();
+ handleNewState();
}
@Override
@@ -407,8 +407,10 @@ public class EipFragment extends Fragment implements Observer {
private boolean isOpenVpnRunningWithoutNetwork() {
boolean isRunning = false;
try {
- isRunning = eipStatus.getLevel() == LEVEL_NONETWORK &&
- mService.isVpnRunning();
+ if (mService != null) {
+ isRunning = eipStatus.getLevel() == LEVEL_NONETWORK &&
+ mService.isVpnRunning();
+ }
} catch (Exception e) {
//eat me
e.printStackTrace();