mirror of https://github.com/M66B/NetGuard.git
Show system DNS as hint text
This commit is contained in:
parent
c6658c8531
commit
05025a575d
|
@ -199,8 +199,8 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Preference pref_dns = screen.findPreference("dns");
|
EditTextPreference pref_dns = (EditTextPreference) screen.findPreference("dns");
|
||||||
pref_dns.setSummary(Util.getDefaultDNS(this));
|
pref_dns.getEditText().setHint(Util.getDefaultDNS(this));
|
||||||
|
|
||||||
// Handle technical info
|
// Handle technical info
|
||||||
Preference.OnPreferenceClickListener listener = new Preference.OnPreferenceClickListener() {
|
Preference.OnPreferenceClickListener listener = new Preference.OnPreferenceClickListener() {
|
||||||
|
@ -463,8 +463,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
|
||||||
SinkholeService.reload(null, "changed " + name, this);
|
SinkholeService.reload(null, "changed " + name, this);
|
||||||
|
|
||||||
else if ("dns".equals(name)) {
|
else if ("dns".equals(name)) {
|
||||||
if (TextUtils.isEmpty(prefs.getString(name, "")))
|
|
||||||
prefs.edit().remove(name).apply();
|
|
||||||
if (prefs.getBoolean("filter", false))
|
if (prefs.getBoolean("filter", false))
|
||||||
SinkholeService.reload(null, "changed " + name, this);
|
SinkholeService.reload(null, "changed " + name, this);
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,6 +160,7 @@
|
||||||
android:title="Native log level" />
|
android:title="Native log level" />
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:defaultValue=""
|
android:defaultValue=""
|
||||||
|
android:dependency="filter"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:key="dns"
|
android:key="dns"
|
||||||
android:title="DNS" />
|
android:title="DNS" />
|
||||||
|
|
Loading…
Reference in New Issue