Files
brave-core/patches/components-browser_ui-settings-android-java-src-org-chromium-components-browser_ui-settings-SettingsUtils.java.patch
T
AlexeyBarabash 2a0d8de9ef Android settings containment (#35636)
* [Android] Fixed containment at settings

Resolves https://github.com/brave/brave-browser/issues/54164

* Fixed containment for the Homepage settings screen
* Fixed containment for WebRTC policy screen
* Fixed containment at Languages settings; modified SettingsUtils.getVisiblePreferences
* Fixed  privacy item
* Fixed containment for NFT discovery learn more preference
Replaced TextMessagePreference (BackgroundStyle.NONE, transparent) with
ChromeBasePreference so the NFT description groups with the Enable NFT
discovery toggle in one card. Follows the same camera OS-warning pattern:
ForegroundColorSpan for the link color, setOnPreferenceClickListener for
the tap action, matching Chromium upstream conventions.
* Moved NFT discovery block before Reset wallet preference
Enable NFT discovery toggle and its description now appear above
"Reset and clear wallet data", matching the intended UX order.
* Fixed containment for Brave Firewall + VPN settings
Set initial visibility of server_change_location in onCreatePreferences
to avoid animated removal artifact. Call notifyPreferencesUpdated() after
dynamic visibility changes in updateSummaries so containment styles stay
in sync with adapter positions.
* Fixed containment for New Tab Page settings learn more
Replaced ClickableSpansTextMessagePreference with ChromeBasePreference
for the sponsored images learn more link so it groups into the
Background Images card with the toggles above it.
* Removed On/Off captions from New Tab Page switch prefs
2026-04-25 18:49:09 +03:00

14 lines
1.0 KiB
Diff

diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
index a92d2866e67f635264ee16d5af0d17ef74d96eab..e196372510e09518d7a8cdc614f87b098fda8210 100644
--- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
+++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
@@ -148,7 +148,7 @@ public class SettingsUtils {
* @param preference The preference to start from.
* @param visiblePreferences The list to add visible preferences to.
*/
- private static void addVisiblePreferences(
+ static void addVisiblePreferences(
Preference preference, ArrayList<Preference> visiblePreferences) {
visiblePreferences.add(preference);
if (preference instanceof PreferenceGroup preferenceGroup) {