mirror of
https://github.com/M66B/NetGuard.git
synced 2025-02-24 15:21:19 +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,7 +583,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
checkAddress(vpn4);
|
||||
} catch (Throwable ex) {
|
||||
prefs.edit().remove("vpn4").apply();
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
if (!TextUtils.isEmpty(vpn4))
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
SinkholeService.reload("changed " + name, this);
|
||||
getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_vpn4, prefs.getString("vpn4", "10.1.10.1")));
|
||||
|
@ -594,7 +595,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
checkAddress(vpn6);
|
||||
} catch (Throwable ex) {
|
||||
prefs.edit().remove("vpn6").apply();
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
if (!TextUtils.isEmpty(vpn6))
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
SinkholeService.reload("changed " + name, this);
|
||||
getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_vpn6, prefs.getString("vpn6", "fd00:1:fd00:1:fd00:1:fd00:1")));
|
||||
|
@ -605,7 +607,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
|||
checkAddress(dns);
|
||||
} catch (Throwable ex) {
|
||||
prefs.edit().remove("dns").apply();
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
if (!TextUtils.isEmpty(dns))
|
||||
Toast.makeText(ActivitySettings.this, ex.toString(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
SinkholeService.reload("changed " + name, this);
|
||||
getPreferenceScreen().findPreference(name).setTitle(
|
||||
|
|
Loading…
Reference in a new issue