Cromite Branding: improve settings ui: Modification to the settings ui with the aim of making it clearer (#1237)
This commit is contained in:
@@ -294,6 +294,7 @@ Add-a-GN-flag-to-disable-trybot-verification.patch
|
||||
Override-the-MV2-deprecation.patch
|
||||
Enable-ClickToCall.patch
|
||||
Remove-sideloading-of-version-dll.patch
|
||||
Cromite-Branding--improve-settings-ui.patch
|
||||
|
||||
# temporary or wip patches
|
||||
Temp-PerformanceNavigationTiming-privacy-fix.patch
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Sat, 21 Sep 2024 15:32:02 +0000
|
||||
Subject: Cromite Branding: improve settings ui
|
||||
|
||||
Modification to the settings ui with the aim of making it clearer.
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
chrome/android/chrome_java_resources.gni | 2 +-
|
||||
.../android/java/res/xml/main_preferences.xml | 4 +-
|
||||
.../res/xml/privacy_preferences_cromite.xml | 190 ++++++++++++++++++
|
||||
.../privacy/settings/PrivacySettings.java | 2 +-
|
||||
.../Cromite-settings-ui.grdp | 15 ++
|
||||
5 files changed, 209 insertions(+), 4 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/xml/privacy_preferences_cromite.xml
|
||||
create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Cromite-settings-ui.grdp
|
||||
|
||||
diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
|
||||
--- a/chrome/android/chrome_java_resources.gni
|
||||
+++ b/chrome/android/chrome_java_resources.gni
|
||||
@@ -642,7 +642,7 @@ chrome_java_resources = [
|
||||
"java/res/xml/personalize_google_services_preferences.xml",
|
||||
"java/res/xml/phone_as_a_security_key_accessory_filter.xml",
|
||||
"java/res/xml/incognito_preferences.xml",
|
||||
- "java/res/xml/privacy_preferences.xml",
|
||||
+ "java/res/xml/privacy_preferences.xml", "java/res/xml/privacy_preferences_cromite.xml",
|
||||
"java/res/xml/referer_policy_preferences.xml",
|
||||
"java/res/layout/radio_button_group_referer_policy_preference.xml",
|
||||
"java/res/xml/search_widget_info.xml",
|
||||
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/main_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/main_preferences.xml
|
||||
@@ -7,7 +7,7 @@
|
||||
android:key="sync_promo"
|
||||
android:order="0"/>
|
||||
<PreferenceCategory
|
||||
- android:key="account_and_google_services_section"
|
||||
+ android:key="account_and_google_services_section" app:isPreferenceVisible="false"
|
||||
android:order="1001"
|
||||
android:title="@string/prefs_section_account_and_google_services"/>
|
||||
<org.chromium.chrome.browser.sync.settings.SignInPreference
|
||||
@@ -20,7 +20,7 @@
|
||||
android:layout="@layout/account_management_account_row"
|
||||
android:title="@string/sync_category_title"/>
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
- android:key="google_services"
|
||||
+ android:key="google_services" app:isPreferenceVisible="false"
|
||||
android:order="1004"
|
||||
android:layout="@layout/account_management_account_row"
|
||||
android:title="@string/prefs_google_services"
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences_cromite.xml b/chrome/android/java/res/xml/privacy_preferences_cromite.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences_cromite.xml
|
||||
@@ -0,0 +1,190 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?><!--
|
||||
+Copyright 2022 The Chromium Authors
|
||||
+Use of this source code is governed by a BSD-style license that can be
|
||||
+found in the LICENSE file.
|
||||
+-->
|
||||
+
|
||||
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:title="@string/browsing_data_section_title">
|
||||
+ <Preference
|
||||
+ android:key="clear_browsing_data"
|
||||
+ android:title="@string/clear_browsing_data_title"
|
||||
+ android:summary="@string/clear_browsing_data_summary"
|
||||
+ android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment" />
|
||||
+ <Preference
|
||||
+ android:key="clear_browsing_data_advanced"
|
||||
+ android:title="@string/clear_browsing_data_title"
|
||||
+ android:summary="@string/clear_browsing_data_summary"
|
||||
+ android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataFragmentAdvanced"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="close_tabs_on_exit"
|
||||
+ android:title="@string/close_tabs_on_exit_title"
|
||||
+ android:summary="@string/close_tabs_on_exit_summary"
|
||||
+ android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.SpinnerPreference
|
||||
+ android:key="history_expire_days_threshold"
|
||||
+ android:persistent="false"
|
||||
+ android:title="@string/history_expire_days_threshold_title"
|
||||
+ android:summary="@string/history_expire_days_threshold_summary"
|
||||
+ app:singleLine="true" />
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:title="@string/data_exposed_to_website_section_title">
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
+ android:key="third_party_cookies"
|
||||
+ android:title="@string/third_party_cookies_link_row_label"
|
||||
+ android:fragment="org.chromium.components.browser_ui.site_settings.SingleCategorySettings" />
|
||||
+ <Preference
|
||||
+ android:key="do_not_track"
|
||||
+ android:title="@string/do_not_track_title"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings" />
|
||||
+ <Preference
|
||||
+ android:key="gpc"
|
||||
+ android:title="@string/gpc_title"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy.settings.GpcSettings" />
|
||||
+ <Preference
|
||||
+ android:key="referers_policy"
|
||||
+ android:title="@string/referers_policy_title"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy.settings.RefererSettingsFragment"/>
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="can_make_payment"
|
||||
+ android:title="@string/can_make_payment_title"
|
||||
+ android:summary="@string/settings_can_make_payment_toggle_label" />
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:title="@string/data_exposed_to_device_section_title">
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="allow_custom_tab_intents"
|
||||
+ android:title="@string/allow_custom_tab_intents_title"
|
||||
+ android:summary="@string/allow_custom_tab_intents_summary"
|
||||
+ android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="allow_external_intent_requests"
|
||||
+ android:title="@string/allow_external_intent_requests_title"
|
||||
+ android:summary="@string/allow_external_intent_requests_summary"
|
||||
+ app:featureName="AllowExternalIntentRequests"
|
||||
+ app:needRestart="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="use_tab_switcher_list_mode"
|
||||
+ android:title="@string/tab_switcher_list_mode_title"
|
||||
+ android:summary="@string/tab_switcher_list_mode_summary"
|
||||
+ app:featureName="TabSwitcherListMode"
|
||||
+ app:needRestart="true" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="tabgrid_use_icons"
|
||||
+ android:title="@string/tabgrid_use_icons_title"
|
||||
+ android:summary="@string/tabgrid_use_icons_summary"
|
||||
+ android:defaultValue="false" />
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:title="@string/incognito_related_section_title">
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="open_external_links_incognito"
|
||||
+ android:title="@string/open_external_links_incognito_title"
|
||||
+ android:summary="@string/open_external_links_incognito_summary"
|
||||
+ android:defaultValue="false" />
|
||||
+ <org.chromium.chrome.browser.incognito.reauth.IncognitoReauthSettingSwitchPreference
|
||||
+ android:key="incognito_lock"
|
||||
+ android:title="@string/settings_incognito_tab_lock_title"
|
||||
+ android:summary="@string/settings_incognito_tab_lock_summary_android_setting_off"
|
||||
+ android:persistent="false" />
|
||||
+ <Preference
|
||||
+ android:key="incognito_settings"
|
||||
+ android:title="@string/incognito_settings_title"
|
||||
+ android:summary="@string/incognito_settings_summary"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy.settings.IncognitoSettings"/>
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:key="security_section"
|
||||
+ android:title="@string/security_section_title">
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="https_first_mode"
|
||||
+ android:title="@string/settings_https_first_mode_title"
|
||||
+ android:summary="@string/settings_https_first_mode_summary" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
+ android:key="secure_dns"
|
||||
+ android:title="@string/settings_secure_dns_title"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings" />
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+ <PreferenceCategory
|
||||
+ android:title="@string/services_category_title">
|
||||
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
|
||||
+ android:key="proxy"
|
||||
+ android:title="@string/proxy_title"
|
||||
+ app:url="@string/proxy_url" />
|
||||
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
|
||||
+ android:key="cromite_flags"
|
||||
+ android:title="@string/cromite_flags_title"
|
||||
+ app:url="@string/cromite_flags_url" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="search_suggestions"
|
||||
+ android:title="@string/improve_search_suggestions_title"
|
||||
+ android:summary="@string/improve_search_suggestions_summary"
|
||||
+ android:persistent="false"/>
|
||||
+ <Preference
|
||||
+ android:key="phone_as_a_security_key"
|
||||
+ android:title="@string/cablev2_paask_title"
|
||||
+ android:summary="@string/cablev2_paask_body"
|
||||
+ android:fragment="org.chromium.chrome.browser.webauthn.PrivacySettingsFragment" />
|
||||
+ </PreferenceCategory>
|
||||
+
|
||||
+ <!--Always hidden-->
|
||||
+ <Preference
|
||||
+ android:key="safe_browsing"
|
||||
+ android:title="@string/prefs_safe_browsing_title"
|
||||
+ android:summary="@string/prefs_safe_browsing_summary"
|
||||
+ android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
+ android:key="contextual_search"
|
||||
+ android:title="@string/contextual_search_title"
|
||||
+ android:fragment="org.chromium.chrome.browser.contextualsearch.ContextualSearchSettingsFragment"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <Preference
|
||||
+ android:key="privacy_guide"
|
||||
+ app:isPreferenceVisible="false"
|
||||
+ android:title="@string/privacy_guide_pref_title"
|
||||
+ android:summary="@string/privacy_guide_pref_summary"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy_guide.PrivacyGuideFragment" />
|
||||
+ <Preference
|
||||
+ android:key="tracking_protection"
|
||||
+ android:title="@string/tracking_protection_title"
|
||||
+ android:summary="@string/tracking_protection_summary"
|
||||
+ android:fragment="org.chromium.components.privacy_sandbox.TrackingProtectionSettings"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <Preference
|
||||
+ android:key="ip_protection"
|
||||
+ android:title="@string/ip_protection_title"
|
||||
+ android:fragment="org.chromium.components.privacy_sandbox.IpProtectionSettingsFragment"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <Preference
|
||||
+ android:key="fp_protection"
|
||||
+ android:title="@string/tracking_protection_fingerprinting_protection_title"
|
||||
+ android:fragment="org.chromium.components.privacy_sandbox.FingerprintingProtectionSettingsFragment"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <Preference
|
||||
+ android:key="privacy_sandbox"
|
||||
+ android:title="@string/ad_privacy_link_row_label"
|
||||
+ android:summary="@string/ad_privacy_link_row_sub_label"
|
||||
+ android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment" />
|
||||
+ <Preference
|
||||
+ android:key="preload_pages"
|
||||
+ android:title="@string/preload_pages_title"
|
||||
+ android:summary="@string/preload_pages_summary"
|
||||
+ android:fragment="org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsFragment"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.TextMessagePreference
|
||||
+ android:key="sync_and_services_link"
|
||||
+ android:summary="@string/privacy_sync_and_services_link_legacy"
|
||||
+ app:allowDividerBelow="false"
|
||||
+ app:isPreferenceVisible="false" />
|
||||
+</PreferenceScreen>
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -129,7 +129,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
|
||||
public void onCreatePreferencesCromite(Bundle savedInstanceState, String rootKey) {
|
||||
getActivity().setTitle(R.string.prefs_privacy_security);
|
||||
|
||||
- SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_preferences);
|
||||
+ SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_preferences_cromite);
|
||||
|
||||
Preference fpProtectionPreference = findPreference(PREF_FP_PROTECTION);
|
||||
fpProtectionPreference.setVisible(shouldShowFpProtectionUI());
|
||||
diff --git a/chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Cromite-settings-ui.grdp b/chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Cromite-settings-ui.grdp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Cromite-settings-ui.grdp
|
||||
@@ -0,0 +1,15 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<grit-part>
|
||||
+ <message name="IDS_BROWSING_DATA_SECTION_TITLE" desc="">
|
||||
+ Browsing data
|
||||
+ </message>
|
||||
+ <message name="IDS_DATA_EXPOSED_TO_WEBSITE_SECTION_TITLE" desc="">
|
||||
+ Data exposed to the websites
|
||||
+ </message>
|
||||
+ <message name="IDS_INCOGNITO_RELATED_SECTION_TITLE" desc="">
|
||||
+ Incognito mode
|
||||
+ </message>
|
||||
+ <message name="IDS_DATA_EXPOSED_TO_DEVICE_SECTION_TITLE" desc="">
|
||||
+ Data exposed in the device
|
||||
+ </message>
|
||||
+</grit-part>
|
||||
--
|
||||
Reference in New Issue
Block a user