diff --git a/ADBLOCKING.md b/ADBLOCKING.md index a6fb8c80..1e844b0e 100644 --- a/ADBLOCKING.md +++ b/ADBLOCKING.md @@ -5,8 +5,8 @@ Instructions: * Download/install the latest NetGuard version [from GitHub](https://github.com/M66B/NetGuard/releases) * Enable the setting '*Filter traffic*' in the advanced options (always enabled on Android 5.0 or earlier) -* Import or download [a hosts file](https://en.wikipedia.org/wiki/Hosts_(file)) using the NetGuard backup settings * Enable the setting '*Block domain names*' in the advanced options (default enabled) +* Import or download [a hosts file](https://en.wikipedia.org/wiki/Hosts_(file)) using the NetGuard backup settings * Disable browser compression (Chrome: three dot menu > Settings > Data Saver > Off) * Wait 10 minutes to let the Android DNS cache time out * Test if it works by opening [this page](http://www.netguard.me/test) diff --git a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java index 99a35108..0aaae09f 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivitySettings.java +++ b/app/src/main/java/eu/faircode/netguard/ActivitySettings.java @@ -270,8 +270,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere cat_backup.removePreference(pref_hosts_download); } else { - pref_block_domains.setEnabled(new File(getFilesDir(), "hosts.txt").exists()); - String last_import = prefs.getString("hosts_last_import", null); String last_download = prefs.getString("hosts_last_download", null); if (last_import != null) @@ -310,7 +308,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere prefs.edit().putString("hosts_last_download", last).apply(); if (running) { - getPreferenceScreen().findPreference("use_hosts").setEnabled(true); pref_hosts_download.setSummary(getString(R.string.msg_download_last, last)); Toast.makeText(ActivitySettings.this, R.string.msg_downloaded, Toast.LENGTH_LONG).show(); } @@ -947,7 +944,6 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere prefs.edit().putString("hosts_last_import", last).apply(); if (running) { - getPreferenceScreen().findPreference("use_hosts").setEnabled(true); getPreferenceScreen().findPreference("hosts_import").setSummary(getString(R.string.msg_import_last, last)); Toast.makeText(ActivitySettings.this, R.string.msg_completed, Toast.LENGTH_LONG).show(); }