diff options
author | cyberta <cyberta@riseup.net> | 2021-11-24 09:26:40 +0000 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2021-11-24 09:26:40 +0000 |
commit | 68ca9c827da3c3fad9e70c74960f113560fd6711 (patch) | |
tree | dda6f99c2ef2b222d4f07d0ef80d5d0cc373604e /app/src/main/java/de/blinkt | |
parent | 9b2b57d8617e60c0b69713e1e5f14dbb8e57c70a (diff) | |
parent | e3cd28aa6ef16d9bde179a3e1117cdfa585939a4 (diff) |
Merge branch 'simply_secure_UI_changes' into 'master'
Gateway selection UI overhaul
Closes #9047
See merge request leap/bitmask_android!140
Diffstat (limited to 'app/src/main/java/de/blinkt')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 1 | ||||
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 9ed2054e..ae38a59b 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -377,6 +377,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac // connections[n], n>0 gets choosen? Connection connection = mProfile.mConnections[0]; + VpnStatus.setCurrentlyConnectingProfile(mProfile); VpnStatus.logInfo(R.string.building_configration); VpnStatus.updateStateString("VPN_GENERATE_CONFIG", "", R.string.building_configration, ConnectionStatus.LEVEL_START); diff --git a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java index 8007f7c5..4fa5a7b6 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java +++ b/app/src/main/java/de/blinkt/openvpn/core/VpnStatus.java @@ -48,6 +48,7 @@ public class VpnStatus { final static java.lang.Object readFileLock = new Object(); private static VpnProfile lastConnectedProfile; + private static VpnProfile currentlyConnectingProfile; public static TrafficHistory trafficHistory; @@ -170,6 +171,15 @@ public class VpnStatus { } + public static void setCurrentlyConnectingProfile(VpnProfile connectingProfile) { + currentlyConnectingProfile = connectingProfile; + } + + public static String getCurrentlyConnectingVpnName() { + return currentlyConnectingProfile != null ? currentlyConnectingProfile.mName : null; + } + + public static String getLastConnectedVpnName() { return lastConnectedProfile != null ? lastConnectedProfile.mName : null; } @@ -531,4 +541,8 @@ public class VpnStatus { public static boolean isAlwaysOn() { return isAlwaysOnBooting.get(); } + + public static boolean isUsingBridges() { + return lastConnectedProfile != null && lastConnectedProfile.mUsePluggableTransports; + } } |