Small improvement

This commit is contained in:
M66B 2023-09-05 21:16:16 +02:00
parent 0626bb596d
commit 5097b0c523
1 changed files with 6 additions and 7 deletions

View File

@ -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");