mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-24 23:23:08 +00:00
Suppress error message when clearing VPN IP/DNS
This commit is contained in:
parent
af7ea3f3c6
commit
c77d04d714
1 changed files with 6 additions and 3 deletions
|
@ -583,6 +583,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
checkAddress(vpn4);
|
||||
} catch (Throwable ex) {
|
||||
prefs.edit().remove("vpn4").apply();
|
||||
if (!TextUtils.isEmpty(vpn4))
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
SinkholeService.reload("changed " + name, this);
|
||||
|
@ -594,6 +595,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
checkAddress(vpn6);
|
||||
} catch (Throwable ex) {
|
||||
prefs.edit().remove("vpn6").apply();
|
||||
if (!TextUtils.isEmpty(vpn6))
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
SinkholeService.reload("changed " + name, this);
|
||||
|
@ -605,6 +607,7 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
checkAddress(dns);
|
||||
} catch (Throwable ex) {
|
||||
prefs.edit().remove("dns").apply();
|
||||
if (!TextUtils.isEmpty(dns))
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
SinkholeService.reload("changed " + name, this);
|
||||
|
|
Loading…
Reference in a new issue