1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-01-30 19:31:26 +00:00

Fallback to connectivity changes on exception

This commit is contained in:
M66B 2017-08-10 19:13:05 +02:00
parent 456773f6c7
commit a4f1024eeb

View file

@ -2198,7 +2198,12 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
registeredPackageChanged = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
listenNetworkChanges();
try {
listenNetworkChanges();
} catch (Throwable ex) {
Log.w(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
listenConnectivityChanges();
}
else
listenConnectivityChanges();