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 2905e96d006..1ad831e1b7e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -674,6 +674,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. + None diff --git a/res/xml/security_dashboard_settings.xml b/res/xml/security_dashboard_settings.xml index 3a062884976..db158b72433 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" /> + +