mirror of https://github.com/M66B/FairEmail.git
Evaluate underlying networks only when active network is a VPN
This commit is contained in:
parent
c8df742a33
commit
cec0d1032c
|
@ -337,10 +337,10 @@ public class Helper {
|
||||||
|
|
||||||
Log.i(Helper.TAG, "isMetered: active caps=" + caps);
|
Log.i(Helper.TAG, "isMetered: active caps=" + caps);
|
||||||
|
|
||||||
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN) &&
|
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
|
||||||
caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED)) {
|
boolean unmetered = caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
|
||||||
Log.i(Helper.TAG, "isMetered: active not VPN unmetered");
|
Log.i(Helper.TAG, "isMetered: active not VPN unmetered=" + unmetered);
|
||||||
return false;
|
return !unmetered;
|
||||||
}
|
}
|
||||||
|
|
||||||
// VPN: evaluate underlying networks
|
// VPN: evaluate underlying networks
|
||||||
|
|
Loading…
Reference in New Issue