From 9afbd458d720a13abfd2ddd30c78fcb2834df124 Mon Sep 17 00:00:00 2001 From: Prabal Singh Date: Mon, 19 Dec 2022 00:28:36 +0000 Subject: [PATCH] Remove Advanced Privacy Settings screen This page will no longer be there in U, all these entries will be in More Security Privacy page. Removes the xml, and redirects the intent to the new More Security Privacy page. Bug: 263038547 Test: manually tested Change-Id: Ib6dad47f79cdaadeff94c640e2001c59a0d8e233 --- AndroidManifest.xml | 8 +- res/xml/privacy_advanced_settings.xml | 104 ------------------ .../privacy/PrivacyDashboardFragment.java | 17 +-- 3 files changed, 7 insertions(+), 122 deletions(-) delete mode 100644 res/xml/privacy_advanced_settings.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 846d2460383..ddc7c340fd1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1902,6 +1902,10 @@ + + + + - - - - diff --git a/res/xml/privacy_advanced_settings.xml b/res/xml/privacy_advanced_settings.xml deleted file mode 100644 index b028008de75..00000000000 --- a/res/xml/privacy_advanced_settings.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/com/android/settings/privacy/PrivacyDashboardFragment.java b/src/com/android/settings/privacy/PrivacyDashboardFragment.java index 045405b0d24..19683b85b6d 100644 --- a/src/com/android/settings/privacy/PrivacyDashboardFragment.java +++ b/src/com/android/settings/privacy/PrivacyDashboardFragment.java @@ -34,7 +34,6 @@ import com.android.settingslib.core.AbstractPreferenceController; import com.android.settingslib.core.lifecycle.Lifecycle; import com.android.settingslib.search.SearchIndexable; -import java.util.Arrays; import java.util.List; @SearchIndexable @@ -77,15 +76,7 @@ public class PrivacyDashboardFragment extends DashboardFragment { @Override protected int getPreferenceScreenResId() { - return getPreferenceScreenResId(getContext()); - } - - private static int getPreferenceScreenResId(Context context) { - if (SafetyCenterManagerWrapper.get().isEnabled(context)) { - return R.xml.privacy_advanced_settings; - } else { - return R.xml.privacy_dashboard_settings; - } + return R.xml.privacy_dashboard_settings; } private static List buildPreferenceControllers( @@ -94,7 +85,7 @@ public class PrivacyDashboardFragment extends DashboardFragment { } public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = - new BaseSearchIndexProvider() { + new BaseSearchIndexProvider(R.xml.privacy_dashboard_settings) { /** * If SafetyCenter is enabled, all of these entries will be in the More Settings * page, and we don't want to index these entries. @@ -105,9 +96,7 @@ public class PrivacyDashboardFragment extends DashboardFragment { if (SafetyCenterManagerWrapper.get().isEnabled(context)) { return null; } - final SearchIndexableResource sir = new SearchIndexableResource(context); - sir.xmlResId = getPreferenceScreenResId(context); - return Arrays.asList(sir); + return super.getXmlResourcesToIndex(context, enabled); } @Override