mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-31 03:41:20 +00:00
Fallback to connectivity changes on exception
This commit is contained in:
parent
456773f6c7
commit
a4f1024eeb
1 changed files with 6 additions and 1 deletions
|
@ -2198,7 +2198,12 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
registeredPackageChanged = true;
|
registeredPackageChanged = true;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
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
|
else
|
||||||
listenConnectivityChanges();
|
listenConnectivityChanges();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue