mirror of https://github.com/M66B/NetGuard.git
Disable before stopping
This commit is contained in:
parent
5bbfd89f02
commit
a11097d992
|
@ -363,16 +363,16 @@ public class SinkholeService extends VpnService {
|
||||||
public void onRevoke() {
|
public void onRevoke() {
|
||||||
Log.i(TAG, "Revoke");
|
Log.i(TAG, "Revoke");
|
||||||
|
|
||||||
|
// Disable firewall
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
|
prefs.edit().putBoolean("enabled", false).apply();
|
||||||
|
|
||||||
if (vpn != null) {
|
if (vpn != null) {
|
||||||
stopDebug();
|
stopDebug();
|
||||||
stopVPN(vpn);
|
stopVPN(vpn);
|
||||||
vpn = null;
|
vpn = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable firewall
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
|
||||||
prefs.edit().putBoolean("enabled", false).apply();
|
|
||||||
|
|
||||||
// Display warning
|
// Display warning
|
||||||
showDisabledNotification();
|
showDisabledNotification();
|
||||||
Widget.updateWidgets(this);
|
Widget.updateWidgets(this);
|
||||||
|
|
Loading…
Reference in New Issue