mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 03:15:39 +01:00
Revert "Special case for VPN kill switch"
This reverts commit 954f6ed1a1.
This commit is contained in:
@@ -274,19 +274,6 @@ public class ConnectionHelper {
|
||||
|
||||
Network active = cm.getActiveNetwork();
|
||||
if (active == null) {
|
||||
// Special case:
|
||||
// - getActiveNetworkInfo: DISCONNECTED/BLOCKED (data saver / kill switch?)
|
||||
// - getActiveNetwork: null
|
||||
// - OS: GrapheneOS / IVPN
|
||||
if (standalone_vpn)
|
||||
for (Network network : cm.getAllNetworks()) {
|
||||
NetworkCapabilities caps = cm.getNetworkCapabilities(network);
|
||||
if (caps.hasTransport(NetworkCapabilities.TRANSPORT_VPN) &&
|
||||
caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) &&
|
||||
caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED))
|
||||
return !caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
|
||||
}
|
||||
|
||||
Log.i("isMetered: no active network");
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user