From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tad Date: Wed, 20 Apr 2022 01:04:27 -0400 Subject: [PATCH] Add a toggle to disable /etc/hosts lookup Copy and pasted from the GrapheneOS exec spawning toggle patch Signed-off-by: Tad Change-Id: Ic01a142722372d9d57f52947025cd9db23e58ef4 --- res/values/strings.xml | 3 + res/xml/security_dashboard_settings.xml | 6 + .../security/HostsPreferenceController.java | 106 ++++++++++++++++++ .../settings/security/SecuritySettings.java | 1 + 4 files changed, 116 insertions(+) create mode 100644 src/com/android/settings/security/HostsPreferenceController.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 3cad5ba33b..67c47bc7b3 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -13124,6 +13124,9 @@ Enable native code debugging Generate useful logs / bug reports from crashes and permit debugging native code. + Disable DNS content blocker + Disables use of the included /etc/hosts database for data collection and malware blocking. + Privacy diff --git a/res/xml/security_dashboard_settings.xml b/res/xml/security_dashboard_settings.xml index 20f0d4df5b..011f6e1117 100644 --- a/res/xml/security_dashboard_settings.xml +++ b/res/xml/security_dashboard_settings.xml @@ -75,6 +75,12 @@ android:summary="@string/native_debug_summary" android:persistent="false" /> + +