Compare commits

...

2 Commits

Author SHA1 Message Date
M66B a3375e11c8 2.327 release 2023-12-03 17:54:36 +01:00
M66B d786249594 Revert "Simplification"
This reverts commit 2861b11661.
2023-12-03 17:53:59 +01:00
2 changed files with 12 additions and 3 deletions

View File

@ -9,10 +9,10 @@ android {
defaultConfig {
applicationId = "eu.faircode.netguard"
versionName = "2.326"
versionName = "2.327"
minSdkVersion 22
targetSdkVersion 34
versionCode = 2023120101
versionCode = 2023120301
archivesBaseName = "NetGuard-v$versionName"
externalNativeBuild {

View File

@ -38,7 +38,6 @@ import android.graphics.BitmapFactory;
import android.net.ConnectivityManager;
import android.net.LinkProperties;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
@ -166,6 +165,16 @@ public class Util {
if (ni != null && ni.isConnected())
return true;
Network[] networks = cm.getAllNetworks();
if (networks == null)
return false;
for (Network network : networks) {
ni = cm.getNetworkInfo(network);
if (ni != null && ni.getType() != ConnectivityManager.TYPE_VPN && ni.isConnected())
return true;
}
return false;
}