Small improvement

pull/214/head
M66B 1 year ago
parent 0626bb596d
commit 5097b0c523

@ -344,6 +344,7 @@ public class ConnectionHelper {
Network[] networks = cm.getAllNetworks();
if (standalone_vpn && networks != null && networks.length == 1) {
// Internet not checked/validated
// Used for USB/Ethernet internet connection
boolean metered = cm.isActiveNetworkMetered();
Log.i("isMetered: active VPN metered=" + metered);
return metered;
@ -390,7 +391,6 @@ public class ConnectionHelper {
continue;
}
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
underlying = true;
Log.i("isMetered: underlying is connected");
@ -399,7 +399,6 @@ public class ConnectionHelper {
return false;
}
}
}
if (!underlying) {
Log.i("isMetered: no underlying network");

Loading…
Cancel
Save