mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-05 11:08:17 +00:00
Evaluate underlying networks only when active network is a VPN
This commit is contained in:
parent
c8df742a33
commit
cec0d1032c
1 changed files with 4 additions and 4 deletions
|
@ -337,10 +337,10 @@ public class Helper {
|
|||
|
||||
Log.i(Helper.TAG, "isMetered: active caps=" + caps);
|
||||
|
||||
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN) &&
|
||||
caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED)) {
|
||||
Log.i(Helper.TAG, "isMetered: active not VPN unmetered");
|
||||
return false;
|
||||
if (caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)) {
|
||||
boolean unmetered = caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
|
||||
Log.i(Helper.TAG, "isMetered: active not VPN unmetered=" + unmetered);
|
||||
return !unmetered;
|
||||
}
|
||||
|
||||
// VPN: evaluate underlying networks
|
||||
|
|
Loading…
Add table
Reference in a new issue