diff options
author | cyBerta <cyberta@riseup.net> | 2018-02-13 16:06:49 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2018-02-13 16:06:49 +0100 |
commit | a41e0b0f7ec0cff1dc7a34b42d663c777a317e61 (patch) | |
tree | eba639ead30462f595614677a8358e972fd4cef1 /app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java | |
parent | fecdec8975042d0ae27efe63e8cefc7415ca5ad6 (diff) | |
parent | 9b6c368a25510c462ea357121c97edb6d0310021 (diff) |
Merge branch 'origin_0.9.8' into #8831_progress_animation_when_connecting
* added new EipCommand in StartActivity
* added option to add intent extras to EipCommand
* resolved merge conflicts and minor refactorings in:
app/src/main/java/se/leap/bitmaskclient/EipFragment.java
app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java index 0da74872..df252500 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java @@ -24,6 +24,7 @@ import java.util.Observable; import de.blinkt.openvpn.core.ConnectionStatus; import de.blinkt.openvpn.core.LogItem; +import de.blinkt.openvpn.core.ProfileManager; import de.blinkt.openvpn.core.VpnStatus; /** @@ -92,7 +93,14 @@ public class EipStatus extends Observable implements VpnStatus.StateListener { currentEipLevel = EipLevel.CONNECTED; break; case LEVEL_VPNPAUSED: - throw new IllegalStateException("Ics-Openvpn's VPNPAUSED state is not supported by Bitmask"); + if (ProfileManager.getLastConnectedVpn() != null && ProfileManager.getLastConnectedVpn().mPersistTun) { + //if persistTun is enabled, treat EipLevel as connecting as it *shouldn't* allow passing traffic in the clear... + currentEipLevel = EipLevel.CONNECTING; + } else { + //... if persistTun is not enabled, background network traffic will pass in the clear + currentEipLevel = EipLevel.DISCONNECTED; + } + break; case LEVEL_CONNECTING_SERVER_REPLIED: case LEVEL_CONNECTING_NO_SERVER_REPLY_YET: case LEVEL_WAITING_FOR_USER_INPUT: |