Fixed VPN only for Android 5/6

This commit is contained in:
M66B 2022-04-23 08:47:46 +02:00
parent 337db180f0
commit 6f3e293df2
1 changed files with 2 additions and 0 deletions

View File

@ -252,6 +252,8 @@ public class ConnectionHelper {
NetworkInfo ani = cm.getActiveNetworkInfo(); NetworkInfo ani = cm.getActiveNetworkInfo();
if (ani == null || !ani.isConnected()) if (ani == null || !ani.isConnected())
return null; return null;
if (vpn_only && !vpnActive(context))
return null;
return cm.isActiveNetworkMetered(); return cm.isActiveNetworkMetered();
} }