mirror of https://github.com/M66B/FairEmail.git
Validate underlying connections
This commit is contained in:
parent
bc284c9b3c
commit
de8f20d5df
|
@ -383,6 +383,14 @@ public class ConnectionHelper {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean captive = caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL);
|
||||||
|
if ((require_validated || (require_validated_captive && captive)) &&
|
||||||
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
|
||||||
|
!caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)) {
|
||||||
|
Log.i("isMetered: underlying not validated captive=" + captive);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
|
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
|
||||||
underlying = true;
|
underlying = true;
|
||||||
Log.i("isMetered: underlying is connected");
|
Log.i("isMetered: underlying is connected");
|
||||||
|
|
Loading…
Reference in New Issue