mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 22:21:18 +00:00
Revert "Special case for VPN kill switch"
This reverts commit 954f6ed1a1
.
This commit is contained in:
parent
954f6ed1a1
commit
0be53b81a0
2 changed files with 0 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1494,10 +1494,6 @@ public class Helper {
|
|||
return ("Microsoft".equalsIgnoreCase(Build.MANUFACTURER) && "Surface Duo 2".equals(Build.MODEL));
|
||||
}
|
||||
|
||||
static boolean isGrapheneOS() {
|
||||
return "grapheneos".equalsIgnoreCase(Build.HOST);
|
||||
}
|
||||
|
||||
static boolean isArc() {
|
||||
// https://github.com/google/talkback/blob/master/utils/src/main/java/com/google/android/accessibility/utils/FeatureSupport.java
|
||||
return (Build.DEVICE != null) && Build.DEVICE.matches(".+_cheets|cheets_.+");
|
||||
|
|
Loading…
Reference in a new issue