mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 17:57:16 +00:00
Revert "Revert "Workaround suspended VPNs""
This reverts commit 217eb46018
.
This commit is contained in:
parent
ad8cfb1917
commit
58b0c6aa1a
1 changed files with 5 additions and 2 deletions
|
@ -234,8 +234,11 @@ public class ConnectionHelper {
|
|||
// onLost [... state: DISCONNECTED/DISCONNECTED ... available: true]
|
||||
NetworkInfo ani = cm.getNetworkInfo(active);
|
||||
if (ani == null || ani.getState() != NetworkInfo.State.CONNECTED) {
|
||||
Log.i("isMetered: no active info ani=" + ani);
|
||||
return null;
|
||||
Log.i("isMetered: no/connected active info ani=" + ani);
|
||||
if (ani == null ||
|
||||
ani.getState() != NetworkInfo.State.SUSPENDED ||
|
||||
ani.getType() != ConnectivityManager.TYPE_VPN)
|
||||
return null;
|
||||
}
|
||||
|
||||
NetworkCapabilities caps = cm.getNetworkCapabilities(active);
|
||||
|
|
Loading…
Reference in a new issue