From 7c97ec46c18c950c09cc3d6fef67f8c793b1e335 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 18 Feb 2026 17:03:59 +0100 Subject: [PATCH] Content settings infrastructure: fix crash (#2727) --- build/patches/Content-settings-infrastructure.patch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/patches/Content-settings-infrastructure.patch b/build/patches/Content-settings-infrastructure.patch index 0f806725..9a49e316 100644 --- a/build/patches/Content-settings-infrastructure.patch +++ b/build/patches/Content-settings-infrastructure.patch @@ -42,7 +42,7 @@ Require: bromite-build-utils.patch .../res/xml/site_settings_preferences.xml | 7 + .../site_settings/AllSiteSettings.java | 5 +- .../BromiteCustomContentSetting.java | 155 +++++++ - .../BromiteCustomContentSettingImpl.java | 415 ++++++++++++++++++ + .../BromiteCustomContentSettingImpl.java | 416 ++++++++++++++++++ ...tomTriStateSiteSettingsPreferenceImpl.java | 24 + .../ContentSettingsResources.java | 32 +- .../site_settings/SingleCategorySettings.java | 57 ++- @@ -84,7 +84,7 @@ Require: bromite-build-utils.patch .../platform/web_content_settings_client.h | 13 + .../execution_context/execution_context.cc | 16 + .../execution_context/execution_context.h | 5 + - 73 files changed, 1963 insertions(+), 106 deletions(-) + 73 files changed, 1964 insertions(+), 106 deletions(-) create mode 100644 components/browser_ui/settings/android/java/res/layout/preference_spinner_single_widget.xml create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java @@ -1776,7 +1776,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c new file mode 100644 --- /dev/null +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java -@@ -0,0 +1,415 @@ +@@ -0,0 +1,416 @@ +/* + This file is part of Bromite. + @@ -2021,7 +2021,8 @@ new file mode 100644 + continue; + } + -+ if (SingleCategorySettings.BINARY_TOGGLE_KEY.equals(preference.getKey())) { ++ if (SingleCategorySettings.BINARY_RADIO_BUTTON_KEY.equals(preference.getKey()) ++ || SingleCategorySettings.BINARY_TOGGLE_KEY.equals(preference.getKey())) { + int setting = ((boolean) newValue) == true ? cs.getDefaultEnabledValue() : + cs.getDefaultDisabledValue(); + @@ -2349,7 +2350,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c BrowserContextHandle browserContextHandle = getBrowserContextHandle(); PrefService prefService = UserPrefs.get(browserContextHandle); + if (BromiteCustomContentSettingImpl.onPreferenceChange(mCategory, -+ browserContextHandle, preference, newValue) == true) { ++ browserContextHandle, preference, newValue)) { + getInfoForOrigins(); + return true; + }