From 6568dbdf116f7b7563a6b5403c7f2242df02790c Mon Sep 17 00:00:00 2001 From: harvey186 Date: Mon, 11 Sep 2023 15:36:33 +0200 Subject: [PATCH] advanced privacy Change-Id: Icb2db233012ed614e843430a60213908ae83fe93 --- .../AdvancedPrivacyDashboardFragment.java | 52 +++++++++++++++++++ res/values/cm_strings.xml | 2 +- .../advanced_privacy_dashboard_settings.xml | 28 ++++++++++ res/xml/top_level_settings.xml | 8 +++ 4 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 src/com/android/settings/privacy/AdvancedPrivacyDashboardFragment.java create mode 100644 res/xml/advanced_privacy_dashboard_settings.xml diff --git a/src/com/android/settings/privacy/AdvancedPrivacyDashboardFragment.java b/src/com/android/settings/privacy/AdvancedPrivacyDashboardFragment.java new file mode 100644 index 0000000000..c0564742c3 --- /dev/null +++ b/res/values/AdvancedPrivacyDashboardFragment.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019-2022 ECORP SAS + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settings.privacy; + +import android.app.Activity; +import android.content.ComponentName; +import android.content.Intent; +import android.os.Bundle; + +import androidx.fragment.app.Fragment; + +import com.android.settings.R; +import com.android.settings.search.BaseSearchIndexProvider; +import com.android.settingslib.search.SearchIndexable; + +@SearchIndexable +public class AdvancedPrivacyDashboardFragment extends Fragment { + + private static final String advancedPrivacyPackageName = "foundation.e.advancedprivacy"; + private static final String advancedPrivacyActivityName = "foundation.e.advancedprivacy.main.MainActivity"; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + Activity activity = getActivity(); + Intent intent = new Intent().setComponent(new ComponentName(advancedPrivacyPackageName, + advancedPrivacyActivityName)); + startActivity(intent); + + if (activity != null) { + activity.finish(); + } + } + + public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = + new BaseSearchIndexProvider(R.xml.advanced_privacy_dashboard_settings); +} \ No newline at end of file diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index a70e709c9b..ca60ed4bfb 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -18,7 +18,7 @@ Cloudflare DNS - one.one.one.one + one.one.one.one Extras diff --git a/res/xml/advanced_privacy_dashboard_settings.xml b/res/xml/advanced_privacy_dashboard_settings.xml new file mode 100644 index 0000000000..8433a4402a --- /dev/null +++ b/res/xml/advanced_privacy_dashboard_settings.xml @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/res/xml/top_level_settings.xml b/res/xml/top_level_settings.xml index d050a1f274..918bcbb004 100644 --- a/res/xml/top_level_settings.xml +++ b/res/xml/top_level_settings.xml @@ -155,6 +155,14 @@ settings:highlightableMenuKey="@string/menu_key_privacy" settings:controller="com.android.settings.privacy.TopLevelPrivacyEntryPreferenceController"/> + +