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 c1f4b6fcde..d9f4a37f2d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -748,6 +748,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. + Lock screen when trust is lost diff --git a/res/xml/security_dashboard_settings.xml b/res/xml/security_dashboard_settings.xml index 3a06288497..db158b7243 100644 --- a/res/xml/security_dashboard_settings.xml +++ b/res/xml/security_dashboard_settings.xml @@ -80,6 +80,12 @@ android:title="@string/native_debug_title" android:summary="@string/native_debug_summary" android:persistent="false" /> + +