1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-03-15 08:29:02 +00:00

Disable before stopping

This commit is contained in:
M66B 2015-11-08 08:41:21 +01:00
parent 5bbfd89f02
commit a11097d992

View file

@ -363,16 +363,16 @@ public class SinkholeService extends VpnService {
public void onRevoke() {
Log.i(TAG, "Revoke");
// Disable firewall
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.edit().putBoolean("enabled", false).apply();
if (vpn != null) {
stopDebug();
stopVPN(vpn);
vpn = null;
}
// Disable firewall
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.edit().putBoolean("enabled", false).apply();
// Display warning
showDisabledNotification();
Widget.updateWidgets(this);