Disable before stopping

This commit is contained in:
M66B 2015-11-08 08:41:21 +01:00
parent 5bbfd89f02
commit a11097d992
1 changed files with 4 additions and 4 deletions

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);