From 457ae09acc35e511c5423b3eeea5220ef719c4f4 Mon Sep 17 00:00:00 2001 From: alexmang Date: Sat, 18 Jul 2020 14:34:12 -0700 Subject: [PATCH] Add filtering of preferences in developer options Search will recursively go into each preference group and set visibility of preferences based on title match. If a preference group (category) has no preferences, we will hide that preference group as well. All queries and titles are sanitized by turning them to lower case and replacing underscores with spaces for convenience. Change-Id: Ibdc689d74d0c872c92c1d523bbc0efdb9e31aecd --- res/layout/home_settings.xml | 21 ++++++++ res/values/dimens.xml | 3 ++ res/values/strings.xml | 3 +- res/values/styles.xml | 9 ++++ .../settings/DeveloperOptionsFragment.java | 51 +++++++++++++++++++ 5 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 res/layout/home_settings.xml diff --git a/res/layout/home_settings.xml b/res/layout/home_settings.xml new file mode 100644 index 0000000000..0f2461ad9e --- /dev/null +++ b/res/layout/home_settings.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 947e635d73..969765f121 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -247,6 +247,9 @@ 12sp 14sp + + 10dp + 8dp diff --git a/res/values/strings.xml b/res/values/strings.xml index 935bb40fb3..80b511a54c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -348,7 +348,8 @@ Work profile is paused. Work apps can\’t send you notifications, use your battery, or access your location - + + Filter Pause work apps and notifications diff --git a/res/values/styles.xml b/res/values/styles.xml index 25f21f35ec..3b9532eeee 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -149,6 +149,15 @@ + + + +