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/se/leap/bitmaskclient/eip/Gateway.java | |
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/se/leap/bitmaskclient/eip/Gateway.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java index 78b33355..a3d3abbc 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java @@ -33,6 +33,7 @@ import java.util.Set; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.ConfigParser; import de.blinkt.openvpn.core.connection.Connection; +import se.leap.bitmaskclient.base.utils.ConfigHelper; import se.leap.bitmaskclient.base.utils.PreferenceHelper; import static se.leap.bitmaskclient.base.models.Constants.FULLNESS; @@ -156,7 +157,7 @@ public class Gateway { try { return load.getDouble(FULLNESS); } catch (JSONException | NullPointerException e) { - return 0; + return ConfigHelper.getConnectionQualityFromTimezoneDistance(timezone); } } @@ -195,6 +196,10 @@ public class Gateway { return vpnProfiles.get(transportType) != null; } + public HashSet<Connection.TransportType> getSupportedTransports() { + return new HashSet<>(vpnProfiles.keySet()); + } + public int getTimezone() { return timezone; } |