Android origin settings screen (#31877)
* [Android] Brave Origin Settings screen Exposes Brave Origin feature flag to Java. Implements Brave Origin Settings screen. Resolves: https://github.com/brave/brave-browser/issues/50270
This commit is contained in:
@@ -155,11 +155,13 @@ android_resources("java_resources") {
|
||||
"java/brave-res/drawable/always_on_tab_selector.xml",
|
||||
"java/brave-res/drawable/always_on_tutorial_action_bg.xml",
|
||||
"java/brave-res/drawable/antenna_layer_list.xml",
|
||||
"java/brave-res/drawable/bar_chart.xml",
|
||||
"java/brave-res/drawable/bat_ads_logo_button.xml",
|
||||
"java/brave-res/drawable/blue_48_rounded_bg.xml",
|
||||
"java/brave-res/drawable/blue_rounded_notification_bg.xml",
|
||||
"java/brave-res/drawable/bookmark_menu_bg.xml",
|
||||
"java/brave-res/drawable/brave_checkbox.xml",
|
||||
"java/brave-res/drawable/brave_icon_search.xml",
|
||||
"java/brave-res/drawable/brave_menu_bookmarks.xml",
|
||||
"java/brave-res/drawable/brave_menu_downloads.xml",
|
||||
"java/brave-res/drawable/brave_menu_exit.xml",
|
||||
@@ -212,6 +214,7 @@ android_resources("java_resources") {
|
||||
"java/brave-res/drawable/default_dot.xml",
|
||||
"java/brave-res/drawable/default_indicator.xml",
|
||||
"java/brave-res/drawable/ellipse_217.xml",
|
||||
"java/brave-res/drawable/email_shield.xml",
|
||||
"java/brave-res/drawable/file_download.xml",
|
||||
"java/brave-res/drawable/file_upload.xml",
|
||||
"java/brave-res/drawable/fingerprint_unlock_layer_list.xml",
|
||||
@@ -432,6 +435,7 @@ android_resources("java_resources") {
|
||||
"java/brave-res/drawable/origin_plan_upgrade_now_bg.xml",
|
||||
"java/brave-res/drawable/password_match.xml",
|
||||
"java/brave-res/drawable/private_tab_gradient_background.xml",
|
||||
"java/brave-res/drawable/product_origin.xml",
|
||||
"java/brave-res/drawable/product_private_layer_list.xml",
|
||||
"java/brave-res/drawable/product_vpn_layer_list.xml",
|
||||
"java/brave-res/drawable/progress_bar_medium.xml",
|
||||
@@ -697,6 +701,7 @@ android_resources("java_resources") {
|
||||
"java/brave-res/xml/brave_leo_radio_button_group_default_model_preference.xml",
|
||||
"java/brave-res/xml/brave_license_preferences.xml",
|
||||
"java/brave-res/xml/brave_main_preferences.xml",
|
||||
"java/brave-res/xml/brave_origin_preferences.xml",
|
||||
"java/brave-res/xml/brave_password_settings_preferences.xml",
|
||||
"java/brave-res/xml/brave_playlist_preferences.xml",
|
||||
"java/brave-res/xml/brave_privacy_preferences.xml",
|
||||
|
||||
@@ -341,6 +341,9 @@ brave_java_sources = [
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveNewsPreferencesTypeAdapter.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveNewsPreferencesV2.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveNewsSettingsDividerItemDecoration.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveOriginDescriptionPreference.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveOriginPreferences.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveOriginResetPreference.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BravePreferenceDialogFragment.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BravePreferenceFragment.java",
|
||||
"../../brave/android/java/org/chromium/chrome/browser/settings/BraveSearchEngineUtils.java",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/shield_text_color"
|
||||
android:pathData="M20.3333,22H16.1667C15.7058,22 15.3333,21.6267 15.3333,21.1667V2.8333C15.3333,2.3733 15.7058,2 16.1667,2H20.3333C20.7942,2 21.1667,2.3733 21.1667,2.8333V21.1667C21.1667,21.6267 20.7942,22 20.3333,22ZM19.5,3.6667H17V20.3333H19.5V3.6667ZM13.6667,22H9.5C9.0392,22 8.6667,21.6267 8.6667,21.1667V12.8333C8.6667,12.3733 9.0392,12 9.5,12H13.6667C14.1275,12 14.5,12.3733 14.5,12.8333V21.1667C14.5,21.6267 14.1275,22 13.6667,22ZM12.8333,13.6667H10.3333V20.3333H12.8333V13.6667ZM7,22H2.8333C2.3725,22 2,21.6267 2,21.1667V8.6667C2,8.2067 2.3725,7.8333 2.8333,7.8333H7C7.4608,7.8333 7.8333,8.2067 7.8333,8.6667V21.1667C7.8333,21.6267 7.4608,22 7,22ZM6.1667,9.5H3.6667V20.3333H6.1667V9.5Z"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="21"
|
||||
android:viewportHeight="18">
|
||||
<path
|
||||
android:fillColor="@color/shield_text_color"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M19.167,8.16642C18.7067,8.16642 18.3867,7.83469 18.3867,7.37511V2.92289L10.5489,9.79311C10.3918,9.93098 10.1963,9.9995 10,9.9995C9.80366,9.9995 9.60732,9.93098 9.45108,9.79311L1.66681,2.96968V12.4996C1.66681,12.9592 2.04027,13.3335 2.49979,13.3335H11C11.4604,13.3335 11.833,13.7062 11.833,14.1666C11.833,14.627 11.4604,14.9997 11,14.9997H2.49979C1.12123,14.9997 0,13.8783 0,12.4996V2.50008C0,1.12136 1.12123,0 2.49979,0H17.5002C18.8788,0 20,1.12136 20,2.50008V7.33333C20,7.79291 19.6265,8.16642 19.167,8.16642ZM2.70869,1.667L10,8.05842L17.2914,1.667H2.70869ZM14.6,11.5993L16.6,10.6823L18.6,11.5993V13.0485C18.6,14.5299 17.6955,15.8292 16.6,16.3132C15.5045,15.8292 14.6,14.5299 14.6,13.0485V11.5993ZM16.2751,9.07113C16.4819,8.97629 16.7181,8.97629 16.9249,9.07113L19.7249,10.3549C20.0138,10.4873 20.2,10.7829 20.2,11.109V13.0485C20.2,15.3385 18.664,17.4801 16.6,18C14.536,17.4801 13,15.3385 13,13.0485V11.109C13,10.7829 13.1862,10.4873 13.4751,10.3549L16.2751,9.07113Z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/shield_text_color"
|
||||
android:fillType="evenOdd"
|
||||
android:scaleType="fitCenter"
|
||||
android:pathData="M10.3135,2.33496C11.2852,1.50683 12.7148,1.50682 13.6865,2.33496L15.3984,3.79395L17.6416,3.97363C18.9143,4.0752 19.9248,5.08567 20.0264,6.3584L20.2061,8.60156L21.665,10.3135C22.4932,11.2852 22.4932,12.7148 21.665,13.6865L20.2061,15.3984L20.0264,17.6416C19.9248,18.9143 18.9143,19.9248 17.6416,20.0264L15.3984,20.2061L13.6865,21.665C12.7148,22.4932 11.2852,22.4932 10.3135,21.665L8.60156,20.2061L6.3584,20.0264C5.08568,19.9248 4.0752,18.9143 3.97363,17.6416L3.79395,15.3984L2.33496,13.6865C1.50683,12.7148 1.50682,11.2852 2.33496,10.3135L3.79395,8.60156L3.97363,6.3584C4.0752,5.08568 5.08567,4.0752 6.3584,3.97363L8.60156,3.79395L10.3135,2.33496ZM12.6484,3.55273C12.2747,3.23435 11.7253,3.23435 11.3516,3.55273L9.49121,5.1377C9.33105,5.27419 9.13164,5.35728 8.92188,5.37402L6.48535,5.56836C5.996,5.6075 5.6075,5.996 5.56836,6.48535L5.37402,8.92188C5.35728,9.13164 5.27419,9.33105 5.1377,9.49121L3.55273,11.3516C3.23435,11.7253 3.23435,12.2747 3.55273,12.6484L5.1377,14.5088C5.142,14.5138 5.14522,14.5203 5.14941,14.5254C5.85874,15.0759 6.90888,15.0039 7.16211,14.1377C7.32228,13.5893 7.36185,12.9959 7.3125,12.4121C7.30121,12.2785 7.29493,12.1434 7.29492,12.0068C7.29492,9.38145 9.42345,7.25299 12.0488,7.25293C12.7464,7.25293 13.4091,7.40295 14.0059,7.67285L10.5449,11.1338C10.8155,12.3124 11.7433,13.2402 12.9219,13.5107L16.3828,10.0498C16.6527,10.6465 16.8027,11.3093 16.8027,12.0068C16.8026,14.6322 14.6742,16.7607 12.0488,16.7607C11.9123,16.7607 11.7772,16.7544 11.6436,16.7432C11.0033,16.689 10.3662,16.7277 9.7793,16.9248C8.98641,17.1913 8.93349,18.1781 9.45117,18.833C9.46416,18.843 9.47869,18.8516 9.49121,18.8623L11.3516,20.4473C11.7253,20.7657 12.2747,20.7657 12.6484,20.4473L14.5088,18.8623C14.669,18.7258 14.8684,18.6427 15.0781,18.626L17.5146,18.4316C18.004,18.3925 18.3925,18.004 18.4316,17.5146L18.626,15.0781C18.6427,14.8684 18.7258,14.669 18.8623,14.5088L20.4473,12.6484C20.7657,12.2747 20.7657,11.7253 20.4473,11.3516L18.8623,9.49121C18.7258,9.33105 18.6427,9.13164 18.626,8.92188L18.4316,6.48535C18.3925,5.99599 18.004,5.6075 17.5146,5.56836L15.0781,5.37402C14.8684,5.35728 14.669,5.27419 14.5088,5.1377L12.6484,3.55273Z" />
|
||||
|
||||
</vector>
|
||||
@@ -70,20 +70,6 @@
|
||||
app:drawableStartCompat="@drawable/ic_checkmark_gradient" />
|
||||
|
||||
<!-- Premium feature benefit #3 with checkmark icon -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/DefaultRegular"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/origin_paywall_text_3"
|
||||
app:drawableStartCompat="@drawable/ic_checkmark_gradient" />
|
||||
|
||||
<!-- Premium feature benefit #4 with checkmark icon -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -94,7 +80,7 @@
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/origin_paywall_text_4"
|
||||
android:text="@string/origin_paywall_text_3"
|
||||
app:drawableStartCompat="@drawable/ic_checkmark_gradient" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -62,20 +62,6 @@
|
||||
app:drawableStartCompat="@drawable/ic_checkmark_gradient" />
|
||||
|
||||
<!-- Premium feature benefit #3 with checkmark icon -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/DefaultRegular"
|
||||
android:textAlignment="textStart"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/origin_paywall_text_3"
|
||||
app:drawableStartCompat="@drawable/ic_checkmark_gradient" />
|
||||
|
||||
<!-- Premium feature benefit #4 with checkmark icon -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -86,7 +72,7 @@
|
||||
android:layout_marginBottom="16dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:drawablePadding="8dp"
|
||||
android:text="@string/origin_paywall_text_4"
|
||||
android:text="@string/origin_paywall_text_3"
|
||||
app:drawableStartCompat="@drawable/ic_checkmark_gradient" />
|
||||
|
||||
<!-- Separator line between features and subscription plans -->
|
||||
|
||||
@@ -411,6 +411,10 @@
|
||||
<item name="fontWeight">400</item>
|
||||
</style>
|
||||
|
||||
<style name="LargeRegularPrimitiveBlurple40" parent="LargeRegular">>
|
||||
<item name="android:textColor">@color/primitive_blurple_40</item>
|
||||
</style>
|
||||
|
||||
<style name="LargeSemibold">
|
||||
<!-- Default browser size for fonts -->
|
||||
<item name="android:textSize">@dimen/large_semibold</item>
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_closing_all_closes_brave"
|
||||
android:title="@string/prefs_closing_all_tabs_closes_brave"/>
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:key="brave_origin"
|
||||
android:order="14"
|
||||
android:icon="@drawable/product_origin"
|
||||
android:title="@string/menu_origin"/>
|
||||
<PreferenceCategory
|
||||
android:key="display_section"
|
||||
android:order="15"
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="origin_ads_category"
|
||||
android:title="@string/prefs_section_ads">
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="rewards_switch"
|
||||
android:title="@string/origin_rewards_toggle"
|
||||
android:icon="@drawable/brave_menu_rewards"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="origin_analytics_category"
|
||||
android:title="@string/prefs_section_analytics">
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="crash_reports_switch"
|
||||
android:title="@string/origin_crash_reports_toggle"
|
||||
android:icon="@drawable/bar_chart"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="privacy_preserving_analytics_switch"
|
||||
android:title="@string/origin_privacy_preserving_analytics_toggle"
|
||||
android:icon="@drawable/bar_chart"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="origin_features_category"
|
||||
android:title="@string/prefs_section_features">
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="email_aliases_switch"
|
||||
android:title="@string/origin_email_aliases_toggle"
|
||||
android:icon="@drawable/email_shield"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="leo_ai_switch"
|
||||
android:title="@string/origin_leo_ai_toggle"
|
||||
android:icon="@drawable/ic_brave_ai"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="news_switch"
|
||||
android:title="@string/origin_news_toggle"
|
||||
android:icon="@drawable/ic_news"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="statistics_reporting_switch"
|
||||
android:title="@string/origin_statistics_reporting_toggle"
|
||||
android:icon="@drawable/bar_chart"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="vpn_switch"
|
||||
android:title="@string/origin_vpn_toggle"
|
||||
android:icon="@drawable/ic_vpn"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="wallet_switch"
|
||||
android:title="@string/origin_wallet_toggle"
|
||||
android:icon="@drawable/ic_crypto_wallets"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
android:key="web_discovery_project_switch"
|
||||
android:title="@string/origin_web_discovery_project_toggle"
|
||||
android:icon="@drawable/brave_icon_search"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<!-- Informational text about Brave Origin -->
|
||||
<org.chromium.chrome.browser.settings.BraveOriginDescriptionPreference
|
||||
android:key="origin_description"
|
||||
android:summary="@string/origin_description_text" />
|
||||
|
||||
<org.chromium.chrome.browser.settings.BraveOriginResetPreference
|
||||
android:key="reset_to_defaults"
|
||||
android:title="@string/origin_reset_to_defaults" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="origin_subscription_section"
|
||||
android:title="@string/subscription">
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:key="subscription_status"
|
||||
android:title="@string/status"/>
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:key="subscription_expires"
|
||||
android:title="@string/expires"/>
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:key="subscription_manage"
|
||||
android:title="@string/manage_subscription"/>
|
||||
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:key="link_subscription"
|
||||
android:title="@string/link_subscription_title_origin" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -44,4 +44,5 @@ public abstract class BraveFeatureList {
|
||||
"BraveNTPBrandedWallpaperSurveyPanelist";
|
||||
public static final String BRAVE_ACCOUNT = "BraveAccount";
|
||||
public static final String BRAVE_ANDROID_DYNAMIC_COLORS = "BraveAndroidDynamicColors";
|
||||
public static final String BRAVE_ORIGIN = "BraveOrigin";
|
||||
}
|
||||
|
||||
@@ -546,7 +546,8 @@ public class InAppPurchaseWrapper {
|
||||
BraveLeoUtils.bringMainActivityOnTop();
|
||||
}
|
||||
});
|
||||
} else if (isOriginProduct) {
|
||||
} else if (isOriginProduct && activity != null) {
|
||||
final BraveActivity finalActivity = activity;
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
BraveOriginSubscriptionPrefs.setIsSubscriptionActive(
|
||||
@@ -556,6 +557,7 @@ public class InAppPurchaseWrapper {
|
||||
mPurchaseProfile, purchase.getProducts().get(0));
|
||||
BraveOriginSubscriptionPrefs.setOriginPurchaseToken(
|
||||
mPurchaseProfile, purchase.getPurchaseToken());
|
||||
BraveOriginSubscriptionPrefs.openOriginPreferences(finalActivity);
|
||||
});
|
||||
}
|
||||
showToast(context.getResources().getString(R.string.subscription_consumed));
|
||||
|
||||
@@ -128,8 +128,8 @@ public class BraveOriginPlansActivity extends AsyncInitializationActivity {
|
||||
if (productDetails == null) {
|
||||
return;
|
||||
}
|
||||
// Get the current profile and initiate purchase flow for the selected plan. The
|
||||
// purchase is initiated on original profile only.
|
||||
// Always use the regular profile as this activity is only launched from
|
||||
// Settings
|
||||
Profile currentProfile =
|
||||
getProfileProviderSupplier().get().getOriginalProfile();
|
||||
InAppPurchaseWrapper.getInstance()
|
||||
|
||||
+35
-1
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.chromium.chrome.browser.brave_origin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.util.Base64;
|
||||
|
||||
import org.json.JSONException;
|
||||
@@ -22,6 +23,8 @@ import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
import org.chromium.chrome.browser.preferences.BravePref;
|
||||
import org.chromium.chrome.browser.profiles.Profile;
|
||||
import org.chromium.chrome.browser.settings.BraveOriginPreferences;
|
||||
import org.chromium.chrome.browser.settings.SettingsNavigationFactory;
|
||||
import org.chromium.components.prefs.PrefService;
|
||||
import org.chromium.components.user_prefs.UserPrefs;
|
||||
import org.chromium.skus.mojom.SkusResult;
|
||||
@@ -63,6 +66,21 @@ public class BraveOriginSubscriptionPrefs {
|
||||
.setBoolean(BravePref.BRAVE_ORIGIN_SUBSCRIPTION_ACTIVE_ANDROID, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Origin subscription active status for the given profile.
|
||||
*
|
||||
* @param profile The profile to use for preference retrieval
|
||||
* @return The subscription active status, or false if profile is null
|
||||
*/
|
||||
public static boolean getIsSubscriptionActive(@Nullable Profile profile) {
|
||||
if (profile == null) {
|
||||
Log.e(TAG, "getIsSubscriptionActive profile is null");
|
||||
return false;
|
||||
}
|
||||
return UserPrefs.get(profile)
|
||||
.getBoolean(BravePref.BRAVE_ORIGIN_SUBSCRIPTION_ACTIVE_ANDROID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Origin subscription purchase token for the given profile.
|
||||
*
|
||||
@@ -247,7 +265,9 @@ public class BraveOriginSubscriptionPrefs {
|
||||
if (result == null || result.code != SkusResultCode.OK) {
|
||||
Log.e(
|
||||
TAG,
|
||||
"Failed to fetch order credentials: "
|
||||
"Failed to fetch order credentials for order ID: "
|
||||
+ orderId
|
||||
+ " "
|
||||
+ (result != null ? result.message : "null result"));
|
||||
return;
|
||||
}
|
||||
@@ -368,4 +388,18 @@ public class BraveOriginSubscriptionPrefs {
|
||||
prefService.setString(BravePref.BRAVE_ORIGIN_PACKAGE_NAME_ANDROID, "");
|
||||
resetSubscriptionLinkedStatus(profile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the Brave Origin preferences settings screen.
|
||||
*
|
||||
* @param activity The activity to use for launching the settings
|
||||
*/
|
||||
public static void openOriginPreferences(Activity activity) {
|
||||
if (activity.isFinishing()) {
|
||||
Log.e(TAG, "openOriginPreferences activity is finishing");
|
||||
return;
|
||||
}
|
||||
SettingsNavigationFactory.createSettingsNavigation()
|
||||
.startSettings(activity, BraveOriginPreferences.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import android.provider.Settings;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import org.chromium.base.BraveFeatureList;
|
||||
import org.chromium.base.Callback;
|
||||
import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.task.PostTask;
|
||||
import org.chromium.base.task.TaskTraits;
|
||||
@@ -24,6 +25,8 @@ import org.chromium.build.annotations.Nullable;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.BraveLaunchIntentDispatcher;
|
||||
import org.chromium.chrome.browser.brave_leo.BraveLeoPrefUtils;
|
||||
import org.chromium.chrome.browser.brave_origin.BraveOriginPlansActivity;
|
||||
import org.chromium.chrome.browser.brave_origin.BraveOriginSubscriptionPrefs;
|
||||
import org.chromium.chrome.browser.customtabs.BraveAccountCustomTabActivity;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.homepage.settings.BraveHomepageSettings;
|
||||
@@ -93,6 +96,7 @@ public abstract class BraveMainPreferencesBase extends BravePreferenceFragment
|
||||
private static final String PREF_BRAVE_WALLET = "brave_wallet";
|
||||
private static final String PREF_BRAVE_VPN = "brave_vpn";
|
||||
private static final String PREF_BRAVE_LEO = "brave_leo";
|
||||
private static final String PREF_BRAVE_ORIGIN = "brave_origin";
|
||||
private static final String PREF_USE_CUSTOM_TABS = "use_custom_tabs";
|
||||
private static final String PREF_LANGUAGES = "languages";
|
||||
private static final String PREF_BRAVE_LANGUAGES = "brave_languages";
|
||||
@@ -350,6 +354,12 @@ public abstract class BraveMainPreferencesBase extends BravePreferenceFragment
|
||||
setPreferenceOrder(PREF_USE_CUSTOM_TABS, ++generalOrder);
|
||||
}
|
||||
|
||||
if (ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_ORIGIN)) {
|
||||
setPreferenceOrder(PREF_BRAVE_ORIGIN, ++generalOrder);
|
||||
} else {
|
||||
removePreferenceIfPresent(PREF_BRAVE_ORIGIN);
|
||||
}
|
||||
|
||||
int displaySectionOrder = generalOrder;
|
||||
setPreferenceOrder(PREF_DISPLAY_SECTION, ++displaySectionOrder);
|
||||
|
||||
@@ -499,6 +509,57 @@ public abstract class BraveMainPreferencesBase extends BravePreferenceFragment
|
||||
findPreference(PREF_CLOSING_ALL_TABS_CLOSES_BRAVE);
|
||||
assumeNonNull(closingAllTabsClosesBravePreference);
|
||||
closingAllTabsClosesBravePreference.setOnPreferenceChangeListener(this);
|
||||
|
||||
Preference braveOriginPreference = findPreference(PREF_BRAVE_ORIGIN);
|
||||
if (braveOriginPreference != null) {
|
||||
braveOriginPreference.setOnPreferenceClickListener(
|
||||
new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
handleOriginPreferenceClick();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void handleOriginPreferenceClick() {
|
||||
if (getActivity() == null || getActivity().isFinishing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if subscription is active
|
||||
boolean isSubscriptionActive =
|
||||
BraveOriginSubscriptionPrefs.getIsSubscriptionActive(getProfile());
|
||||
|
||||
if (!isSubscriptionActive) {
|
||||
Intent intent = new Intent(getActivity(), BraveOriginPlansActivity.class);
|
||||
getActivity().startActivity(intent);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Subscription is active - request credential summary and open activity
|
||||
// BraveOriginPlansActivity if not active
|
||||
// BraveOriginPreferences if active
|
||||
BraveOriginSubscriptionPrefs.requestCredentialSummary(
|
||||
getProfile(),
|
||||
new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onResult(Boolean isActive) {
|
||||
if (getActivity() == null || getActivity().isFinishing()) {
|
||||
return;
|
||||
}
|
||||
if (isActive != null && isActive) {
|
||||
SettingsNavigationFactory.createSettingsNavigation()
|
||||
.startSettings(getActivity(), BraveOriginPreferences.class);
|
||||
} else {
|
||||
Intent intent =
|
||||
new Intent(getActivity(), BraveOriginPlansActivity.class);
|
||||
getActivity().startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initRateBrave() {
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
/* Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.settings;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
import org.chromium.components.browser_ui.settings.TextMessagePreference;
|
||||
|
||||
/** A preference that displays the Brave Origin description text. */
|
||||
@NullMarked
|
||||
public class BraveOriginDescriptionPreference extends TextMessagePreference {
|
||||
public BraveOriginDescriptionPreference(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(PreferenceViewHolder holder) {
|
||||
super.onBindViewHolder(holder);
|
||||
|
||||
if (!(holder.findViewById(android.R.id.summary) instanceof TextView summaryView)) {
|
||||
return;
|
||||
}
|
||||
// The text is too long, so we need to set the max lines to the maximum value
|
||||
// otherwise it will be cut off
|
||||
summaryView.setMaxLines(Integer.MAX_VALUE);
|
||||
|
||||
// Parse HTML to support bold text
|
||||
CharSequence summary = getSummary();
|
||||
if (summary == null) {
|
||||
return;
|
||||
}
|
||||
Spanned styledText = Html.fromHtml(summary.toString(), Html.FROM_HTML_MODE_LEGACY);
|
||||
summaryView.setText(styledText);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,239 @@
|
||||
/* Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.settings;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
|
||||
import org.chromium.base.supplier.ObservableSupplier;
|
||||
import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
|
||||
import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
|
||||
/** Fragment for Brave Origin subscription preferences. */
|
||||
@NullMarked
|
||||
public class BraveOriginPreferences extends BravePreferenceFragment
|
||||
implements Preference.OnPreferenceChangeListener {
|
||||
private static final String TAG = "BraveOriginPreferences";
|
||||
|
||||
// Preference keys
|
||||
private static final String PREF_REWARDS_SWITCH = "rewards_switch";
|
||||
private static final String PREF_CRASH_REPORTS_SWITCH = "crash_reports_switch";
|
||||
private static final String PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH =
|
||||
"privacy_preserving_analytics_switch";
|
||||
private static final String PREF_EMAIL_ALIASES_SWITCH = "email_aliases_switch";
|
||||
private static final String PREF_LEO_AI_SWITCH = "leo_ai_switch";
|
||||
private static final String PREF_NEWS_SWITCH = "news_switch";
|
||||
private static final String PREF_STATISTICS_REPORTING_SWITCH = "statistics_reporting_switch";
|
||||
private static final String PREF_VPN_SWITCH = "vpn_switch";
|
||||
private static final String PREF_WALLET_SWITCH = "wallet_switch";
|
||||
private static final String PREF_WEB_DISCOVERY_PROJECT_SWITCH = "web_discovery_project_switch";
|
||||
private static final String PREF_RESET_TO_DEFAULTS = "reset_to_defaults";
|
||||
// TODO: Uncomment when subscription status is implemented
|
||||
// private static final String PREF_SUBSCRIPTION_STATUS = "subscription_status";
|
||||
// TODO: Uncomment when subscription expires is implemented
|
||||
// private static final String PREF_SUBSCRIPTION_EXPIRES = "subscription_expires";
|
||||
// TODO: Uncomment when subscription manage is implemented
|
||||
private static final String PREF_SUBSCRIPTION_MANAGE = "subscription_manage";
|
||||
private static final String PREF_LINK_SUBSCRIPTION = "link_subscription";
|
||||
|
||||
private final ObservableSupplierImpl<String> mPageTitle = new ObservableSupplierImpl<>();
|
||||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
SettingsUtils.addPreferencesFromResource(this, R.xml.brave_origin_preferences);
|
||||
mPageTitle.set(getString(R.string.menu_origin));
|
||||
|
||||
// Set up toggle preferences
|
||||
setupTogglePreference(PREF_REWARDS_SWITCH);
|
||||
setupTogglePreference(PREF_CRASH_REPORTS_SWITCH);
|
||||
setupTogglePreference(PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH);
|
||||
setupTogglePreference(PREF_EMAIL_ALIASES_SWITCH);
|
||||
setupTogglePreference(PREF_LEO_AI_SWITCH);
|
||||
setupTogglePreference(PREF_NEWS_SWITCH);
|
||||
setupTogglePreference(PREF_STATISTICS_REPORTING_SWITCH);
|
||||
setupTogglePreference(PREF_VPN_SWITCH);
|
||||
setupTogglePreference(PREF_WALLET_SWITCH);
|
||||
setupTogglePreference(PREF_WEB_DISCOVERY_PROJECT_SWITCH);
|
||||
|
||||
// Set up click preferences
|
||||
Preference resetToDefaults = findPreference(PREF_RESET_TO_DEFAULTS);
|
||||
if (resetToDefaults != null) {
|
||||
resetToDefaults.setOnPreferenceClickListener(
|
||||
preference -> {
|
||||
// TODO: Implement reset to defaults functionality
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Preference subscriptionManage = findPreference(PREF_SUBSCRIPTION_MANAGE);
|
||||
if (subscriptionManage != null) {
|
||||
subscriptionManage.setOnPreferenceClickListener(
|
||||
preference -> {
|
||||
// TODO: Open subscription management
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
Preference linkSubscription = findPreference(PREF_LINK_SUBSCRIPTION);
|
||||
if (linkSubscription != null) {
|
||||
linkSubscription.setOnPreferenceClickListener(
|
||||
preference -> {
|
||||
// TODO: Open link subscription dialog
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
// Update subscription information
|
||||
updateSubscriptionInfo();
|
||||
|
||||
// Apply tinting to all preference icons for proper dark theme support
|
||||
applyIconTinting(getPreferenceScreen(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
boolean isEnabled = (Boolean) newValue;
|
||||
|
||||
updateToggleDescription(preference, isEnabled);
|
||||
if (PREF_REWARDS_SWITCH.equals(key)) {
|
||||
// TODO: Handle rewards toggle change
|
||||
return true;
|
||||
} else if (PREF_CRASH_REPORTS_SWITCH.equals(key)) {
|
||||
// TODO: Handle crash reports toggle change
|
||||
return true;
|
||||
} else if (PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH.equals(key)) {
|
||||
// TODO: Handle privacy preserving analytics toggle change
|
||||
return true;
|
||||
} else if (PREF_EMAIL_ALIASES_SWITCH.equals(key)) {
|
||||
// TODO: Handle email aliases toggle change
|
||||
return true;
|
||||
} else if (PREF_LEO_AI_SWITCH.equals(key)) {
|
||||
// TODO: Handle Leo AI toggle change
|
||||
return true;
|
||||
} else if (PREF_NEWS_SWITCH.equals(key)) {
|
||||
// TODO: Handle news toggle change
|
||||
return true;
|
||||
} else if (PREF_STATISTICS_REPORTING_SWITCH.equals(key)) {
|
||||
// TODO: Handle statistics reporting toggle change
|
||||
return true;
|
||||
} else if (PREF_VPN_SWITCH.equals(key)) {
|
||||
// TODO: Handle VPN toggle change
|
||||
return true;
|
||||
} else if (PREF_WALLET_SWITCH.equals(key)) {
|
||||
// TODO: Handle wallet toggle change
|
||||
return true;
|
||||
} else if (PREF_WEB_DISCOVERY_PROJECT_SWITCH.equals(key)) {
|
||||
// TODO: Handle web discovery project toggle change
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservableSupplier<String> getPageTitle() {
|
||||
return mPageTitle;
|
||||
}
|
||||
|
||||
private void updateSubscriptionInfo() {
|
||||
// TODO: Fetch actual subscription data and update the status and expires preferences
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up a toggle preference with listener and initial state.
|
||||
*
|
||||
* @param key The preference key
|
||||
*/
|
||||
private void setupTogglePreference(String key) {
|
||||
ChromeSwitchPreference preference = (ChromeSwitchPreference) findPreference(key);
|
||||
if (preference != null) {
|
||||
preference.setOnPreferenceChangeListener(this);
|
||||
updateToggleDescription(preference, preference.isChecked());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the description of a toggle preference based on its enabled state. Shows "This
|
||||
* feature is enabled because you opted into it" when enabled, removes the description when
|
||||
* disabled.
|
||||
*
|
||||
* @param preference The preference to update
|
||||
* @param isEnabled Whether the toggle is enabled
|
||||
*/
|
||||
private void updateToggleDescription(Preference preference, boolean isEnabled) {
|
||||
if (isEnabled) {
|
||||
preference.setSummary(R.string.origin_toggle_enabled_description);
|
||||
} else {
|
||||
preference.setSummary(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively applies tinting to all preferences with icons.
|
||||
*
|
||||
* @param preferenceGroup The preference group to process
|
||||
* @param tintList The color state list to apply (fetched once on first call)
|
||||
*/
|
||||
private void applyIconTinting(
|
||||
PreferenceGroup preferenceGroup, @Nullable ColorStateList tintList) {
|
||||
// Fetch the tint list once on the first call
|
||||
if (tintList == null) {
|
||||
tintList =
|
||||
AppCompatResources.getColorStateList(
|
||||
requireContext(), R.color.default_icon_color_secondary_tint_list);
|
||||
if (tintList == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Process all preferences in this group
|
||||
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
|
||||
Preference preference = preferenceGroup.getPreference(i);
|
||||
|
||||
// Apply tinting if this preference has an icon
|
||||
if (preference.getIcon() != null) {
|
||||
applyTintToPreferenceIcon(preference, tintList);
|
||||
}
|
||||
|
||||
// Recursively process nested preference groups
|
||||
if (preference instanceof PreferenceGroup) {
|
||||
applyIconTinting((PreferenceGroup) preference, tintList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the default icon tint to a preference's icon drawable. This ensures icons display
|
||||
* correctly in both light and dark themes by using the default secondary icon color.
|
||||
*
|
||||
* @param preference The preference whose icon should be tinted
|
||||
* @param tintList The color state list to apply to the icon
|
||||
*/
|
||||
private void applyTintToPreferenceIcon(Preference preference, ColorStateList tintList) {
|
||||
Drawable icon = preference.getIcon();
|
||||
if (icon == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Mutate the drawable to avoid affecting other instances
|
||||
icon = icon.mutate();
|
||||
|
||||
// Apply the tint list
|
||||
icon.setTintList(tintList);
|
||||
|
||||
// Set the tinted icon back to the preference
|
||||
preference.setIcon(icon);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.settings;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import org.chromium.build.annotations.NullMarked;
|
||||
import org.chromium.build.annotations.Nullable;
|
||||
import org.chromium.chrome.R;
|
||||
|
||||
/** The preference used to reset Brave Origin settings. */
|
||||
@NullMarked
|
||||
public class BraveOriginResetPreference extends Preference
|
||||
implements Preference.OnPreferenceClickListener {
|
||||
private static final String TAG = "BraveOriginResetPreference";
|
||||
|
||||
public BraveOriginResetPreference(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
setOnPreferenceClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(PreferenceViewHolder holder) {
|
||||
super.onBindViewHolder(holder);
|
||||
TextView titleView = (TextView) holder.findViewById(android.R.id.title);
|
||||
titleView.setTextAppearance(R.style.LargeRegularPrimitiveBlurple40);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
/* Copyright (c) 2025 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.chromium.chrome.browser.origin.settings;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.chromium.base.test.util.DoNotBatch;
|
||||
import org.chromium.chrome.browser.settings.BraveOriginPreferences;
|
||||
import org.chromium.chrome.browser.settings.SettingsActivityTestRule;
|
||||
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
|
||||
import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
|
||||
|
||||
/** Test for {@link BraveOriginPreferences}. Main purpose is to check preference defaults. */
|
||||
@RunWith(ChromeJUnit4ClassRunner.class)
|
||||
@DoNotBatch(reason = "Tests cannot run batched because they launch a Settings activity.")
|
||||
public class BraveOriginPreferencesTest {
|
||||
private static final String PREF_REWARDS_SWITCH = "rewards_switch";
|
||||
private static final String PREF_CRASH_REPORTS_SWITCH = "crash_reports_switch";
|
||||
private static final String PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH =
|
||||
"privacy_preserving_analytics_switch";
|
||||
private static final String PREF_EMAIL_ALIASES_SWITCH = "email_aliases_switch";
|
||||
private static final String PREF_LEO_AI_SWITCH = "leo_ai_switch";
|
||||
private static final String PREF_NEWS_SWITCH = "news_switch";
|
||||
private static final String PREF_STATISTICS_REPORTING_SWITCH = "statistics_reporting_switch";
|
||||
private static final String PREF_VPN_SWITCH = "vpn_switch";
|
||||
private static final String PREF_WALLET_SWITCH = "wallet_switch";
|
||||
private static final String PREF_WEB_DISCOVERY_PROJECT_SWITCH = "web_discovery_project_switch";
|
||||
|
||||
@Rule
|
||||
public final SettingsActivityTestRule<BraveOriginPreferences> mSettingsActivityTestRule =
|
||||
new SettingsActivityTestRule<>(BraveOriginPreferences.class);
|
||||
|
||||
private BraveOriginPreferences mBraveOriginPreferences;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
Looper.prepare();
|
||||
}
|
||||
|
||||
// Test that all switch preferences are off by default.
|
||||
@Test
|
||||
@SmallTest
|
||||
public void testAllSwitchPreferencesDefaultValues() {
|
||||
startSettings();
|
||||
|
||||
// Test rewards switch
|
||||
ChromeSwitchPreference rewardsSwitch =
|
||||
(ChromeSwitchPreference)
|
||||
mBraveOriginPreferences.findPreference(PREF_REWARDS_SWITCH);
|
||||
assertNotNull("PREF_REWARDS_SWITCH should exist", rewardsSwitch);
|
||||
assertFalse("PREF_REWARDS_SWITCH should be off by default", rewardsSwitch.isChecked());
|
||||
|
||||
// Test crash reports switch
|
||||
ChromeSwitchPreference crashReportsSwitch =
|
||||
(ChromeSwitchPreference)
|
||||
mBraveOriginPreferences.findPreference(PREF_CRASH_REPORTS_SWITCH);
|
||||
assertNotNull("PREF_CRASH_REPORTS_SWITCH should exist", crashReportsSwitch);
|
||||
assertFalse(
|
||||
"PREF_CRASH_REPORTS_SWITCH should be off by default",
|
||||
crashReportsSwitch.isChecked());
|
||||
|
||||
// Test privacy preserving analytics switch
|
||||
ChromeSwitchPreference privacyPreservingAnalyticsSwitch =
|
||||
(ChromeSwitchPreference)
|
||||
mBraveOriginPreferences.findPreference(
|
||||
PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH);
|
||||
assertNotNull(
|
||||
"PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH should exist",
|
||||
privacyPreservingAnalyticsSwitch);
|
||||
assertFalse(
|
||||
"PREF_PRIVACY_PRESERVING_ANALYTICS_SWITCH should be off by default",
|
||||
privacyPreservingAnalyticsSwitch.isChecked());
|
||||
|
||||
// Test email aliases switch
|
||||
ChromeSwitchPreference emailAliasesSwitch =
|
||||
(ChromeSwitchPreference)
|
||||
mBraveOriginPreferences.findPreference(PREF_EMAIL_ALIASES_SWITCH);
|
||||
assertNotNull("PREF_EMAIL_ALIASES_SWITCH should exist", emailAliasesSwitch);
|
||||
assertFalse(
|
||||
"PREF_EMAIL_ALIASES_SWITCH should be off by default",
|
||||
emailAliasesSwitch.isChecked());
|
||||
|
||||
// Test Leo AI switch
|
||||
ChromeSwitchPreference leoAiSwitch =
|
||||
(ChromeSwitchPreference) mBraveOriginPreferences.findPreference(PREF_LEO_AI_SWITCH);
|
||||
assertNotNull("PREF_LEO_AI_SWITCH should exist", leoAiSwitch);
|
||||
assertFalse("PREF_LEO_AI_SWITCH should be off by default", leoAiSwitch.isChecked());
|
||||
|
||||
// Test news switch
|
||||
ChromeSwitchPreference newsSwitch =
|
||||
(ChromeSwitchPreference) mBraveOriginPreferences.findPreference(PREF_NEWS_SWITCH);
|
||||
assertNotNull("PREF_NEWS_SWITCH should exist", newsSwitch);
|
||||
assertFalse("PREF_NEWS_SWITCH should be off by default", newsSwitch.isChecked());
|
||||
|
||||
// Test statistics reporting switch
|
||||
ChromeSwitchPreference statisticsReportingSwitch =
|
||||
(ChromeSwitchPreference)
|
||||
mBraveOriginPreferences.findPreference(PREF_STATISTICS_REPORTING_SWITCH);
|
||||
assertNotNull("PREF_STATISTICS_REPORTING_SWITCH should exist", statisticsReportingSwitch);
|
||||
assertFalse(
|
||||
"PREF_STATISTICS_REPORTING_SWITCH should be off by default",
|
||||
statisticsReportingSwitch.isChecked());
|
||||
|
||||
// Test VPN switch
|
||||
ChromeSwitchPreference vpnSwitch =
|
||||
(ChromeSwitchPreference) mBraveOriginPreferences.findPreference(PREF_VPN_SWITCH);
|
||||
assertNotNull("PREF_VPN_SWITCH should exist", vpnSwitch);
|
||||
assertFalse("PREF_VPN_SWITCH should be off by default", vpnSwitch.isChecked());
|
||||
|
||||
// Test wallet switch
|
||||
ChromeSwitchPreference walletSwitch =
|
||||
(ChromeSwitchPreference) mBraveOriginPreferences.findPreference(PREF_WALLET_SWITCH);
|
||||
assertNotNull("PREF_WALLET_SWITCH should exist", walletSwitch);
|
||||
assertFalse("PREF_WALLET_SWITCH should be off by default", walletSwitch.isChecked());
|
||||
|
||||
// Test web discovery project switch
|
||||
ChromeSwitchPreference webDiscoveryProjectSwitch =
|
||||
(ChromeSwitchPreference)
|
||||
mBraveOriginPreferences.findPreference(PREF_WEB_DISCOVERY_PROJECT_SWITCH);
|
||||
assertNotNull("PREF_WEB_DISCOVERY_PROJECT_SWITCH should exist", webDiscoveryProjectSwitch);
|
||||
assertFalse(
|
||||
"PREF_WEB_DISCOVERY_PROJECT_SWITCH should be off by default",
|
||||
webDiscoveryProjectSwitch.isChecked());
|
||||
}
|
||||
|
||||
private void startSettings() {
|
||||
mSettingsActivityTestRule.startSettingsActivity();
|
||||
mBraveOriginPreferences = mSettingsActivityTestRule.getFragment();
|
||||
Assert.assertNotNull("SettingsActivity failed to launch.", mBraveOriginPreferences);
|
||||
}
|
||||
}
|
||||
+68
-1
@@ -5,6 +5,8 @@
|
||||
|
||||
package org.chromium.chrome.browser.settings;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.os.Looper;
|
||||
@@ -15,10 +17,16 @@ import androidx.test.filters.SmallTest;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.chromium.base.BraveFeatureList;
|
||||
import org.chromium.base.test.util.CriteriaHelper;
|
||||
import org.chromium.base.test.util.DoNotBatch;
|
||||
import org.chromium.base.test.util.Features.DisableFeatures;
|
||||
import org.chromium.base.test.util.Features.EnableFeatures;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.tracing.settings.DeveloperSettings;
|
||||
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
|
||||
|
||||
@@ -26,8 +34,12 @@ import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
|
||||
@RunWith(ChromeJUnit4ClassRunner.class)
|
||||
@DoNotBatch(reason = "Tests cannot run batched because they launch a Settings activity.")
|
||||
public class BraveMainSettingsFragmentTest {
|
||||
private final SettingsActivityTestRule<MainSettings> mSettingsActivityTestRule =
|
||||
private static final String PREF_BRAVE_ORIGIN = "brave_origin";
|
||||
|
||||
@Rule
|
||||
public final SettingsActivityTestRule<MainSettings> mSettingsActivityTestRule =
|
||||
new SettingsActivityTestRule<>(MainSettings.class);
|
||||
|
||||
private MainSettings mMainSettings;
|
||||
|
||||
@Before
|
||||
@@ -96,6 +108,61 @@ public class BraveMainSettingsFragmentTest {
|
||||
}
|
||||
}
|
||||
|
||||
// Test for BraveOrigin pref when feature is disabled. It should not be shown.
|
||||
@Test
|
||||
@SmallTest
|
||||
@DisableFeatures(BraveFeatureList.BRAVE_ORIGIN)
|
||||
public void testBraveOriginPrefNotShownWhenFeatureDisabled() {
|
||||
Assert.assertFalse(
|
||||
"BraveOrigin feature should be disabled",
|
||||
ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_ORIGIN));
|
||||
startSettings();
|
||||
|
||||
// Wait for async preference updates to complete
|
||||
// Note: We check getPreferenceScreen().findPreference() directly because
|
||||
// BraveMainPreferencesBase.findPreference() also returns removed preferences
|
||||
CriteriaHelper.pollUiThread(
|
||||
() -> {
|
||||
return mMainSettings.getPreferenceScreen().findPreference(PREF_BRAVE_ORIGIN)
|
||||
== null;
|
||||
},
|
||||
"Preference should be removed when feature is disabled",
|
||||
5000L,
|
||||
100L);
|
||||
|
||||
Preference braveOriginPref =
|
||||
mMainSettings.getPreferenceScreen().findPreference(PREF_BRAVE_ORIGIN);
|
||||
assertNull(
|
||||
"PREF_BRAVE_ORIGIN should not be shown when feature is disabled", braveOriginPref);
|
||||
}
|
||||
|
||||
// Test for BraveOrigin pref when feature is enabled. It should be shown.
|
||||
@Test
|
||||
@SmallTest
|
||||
@EnableFeatures(BraveFeatureList.BRAVE_ORIGIN)
|
||||
public void testBraveOriginPrefShownWhenFeatureEnabled() {
|
||||
Assert.assertTrue(
|
||||
"BraveOrigin feature should be enabled",
|
||||
ChromeFeatureList.isEnabled(BraveFeatureList.BRAVE_ORIGIN));
|
||||
startSettings();
|
||||
|
||||
// Wait for async preference updates to complete
|
||||
// Note: We check getPreferenceScreen().findPreference() directly because
|
||||
// BraveMainPreferencesBase.findPreference() also returns removed preferences
|
||||
CriteriaHelper.pollUiThread(
|
||||
() -> {
|
||||
return mMainSettings.getPreferenceScreen().findPreference(PREF_BRAVE_ORIGIN)
|
||||
!= null;
|
||||
},
|
||||
"Preference should be present when feature is enabled",
|
||||
5000L,
|
||||
100L);
|
||||
|
||||
Preference braveOriginPref =
|
||||
mMainSettings.getPreferenceScreen().findPreference(PREF_BRAVE_ORIGIN);
|
||||
assertNotNull("PREF_BRAVE_ORIGIN should be shown when feature is enabled", braveOriginPref);
|
||||
}
|
||||
|
||||
private void startSettings() {
|
||||
mSettingsActivityTestRule.startSettingsActivity();
|
||||
mMainSettings = mSettingsActivityTestRule.getFragment();
|
||||
|
||||
@@ -344,6 +344,12 @@ This file contains all "about" strings. It is set to NOT be translated, in tran
|
||||
<message name="IDS_PREFS_SECTION_FEATURES" desc="Title for Brave-specific features section">
|
||||
Features
|
||||
</message>
|
||||
<message name="IDS_PREFS_SECTION_ADS" desc="Title for Brave Origin Ads section">
|
||||
Ads
|
||||
</message>
|
||||
<message name="IDS_PREFS_SECTION_ANALYTICS" desc="Title for Brave Origin Analytics section">
|
||||
Analytics
|
||||
</message>
|
||||
<message name="IDS_BRAVE_SHIELDS_AND_PRIVACY" desc="Label for the settings related to shields and privacy">
|
||||
Brave Shields & privacy
|
||||
</message>
|
||||
@@ -3157,6 +3163,51 @@ If you don't accept this request, VPN will not reconnect and your internet conne
|
||||
<message name="IDS_MENU_BRAVE_LEO" desc="Brave AI menu item text">
|
||||
Leo AI
|
||||
</message>
|
||||
<message name="IDS_MENU_ORIGIN" desc="Brave Origin settings menu item text">
|
||||
Origin
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_REWARDS_TOGGLE" desc="Brave Origin rewards toggle title">
|
||||
Rewards
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_CRASH_REPORTS_TOGGLE" desc="Brave Origin automatically send crash reports toggle title">
|
||||
Automatically send crash reports
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_PRIVACY_PRESERVING_ANALYTICS_TOGGLE" desc="Brave Origin privacy preserving analytics toggle title">
|
||||
Privacy preserving analytics
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_EMAIL_ALIASES_TOGGLE" desc="Brave Origin email aliases toggle title">
|
||||
Email aliases
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_LEO_AI_TOGGLE" desc="Brave Origin Leo AI toggle title">
|
||||
Leo AI
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_NEWS_TOGGLE" desc="Brave Origin News toggle title">
|
||||
News
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_STATISTICS_REPORTING_TOGGLE" desc="Brave Origin Statistics reporting toggle title">
|
||||
Statistics reporting
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_VPN_TOGGLE" desc="Brave Origin VPN toggle title">
|
||||
VPN
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_WALLET_TOGGLE" desc="Brave Origin Wallet toggle title">
|
||||
Wallet
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_WEB_DISCOVERY_PROJECT_TOGGLE" desc="Brave Origin Web Discovery Project toggle title">
|
||||
Web Discovery Project
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_RESET_TO_DEFAULTS" desc="Brave Origin reset to defaults preference title">
|
||||
Reset to defaults
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_TOGGLE_ENABLED_DESCRIPTION" desc="Description shown when a toggle is enabled in Brave Origin settings">
|
||||
This feature is enabled because you opted into it
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_DESCRIPTION_TEXT" desc="Brave Origin description text explaining the subscription">
|
||||
Brave Origin is a subscription-based way to disable the revenue-generating features that otherwise support Brave as a business. Brave Origin subscribers will continue to benefit from our industry-leading privacy, adblock, and speed (via Brave Shields), as well as regular software updates, Chromium patches, and security and privacy improvements. They'll also unlock the option to disable features like Brave Leo, News, Rewards, Wallet, VPN, Web3 domains, and more.<br><br>Subscribers will see a new control panel in the browser settings menu. Existing features—as well as any new features we ship in the future—would appear here, and be toggled off by default.<br><br><b>Note: Brave Origin will not disable browser features that you currently use, and will not affect Brave Search features or Brave Search Ads.</b>
|
||||
</message>
|
||||
<message name="IDS_LINK_SUBSCRIPTION_TITLE_ORIGIN" desc="Brave Origin link subscription settings title text">
|
||||
Link purchase to your Brave account
|
||||
</message>
|
||||
<message name="IDS_BRAVE_WALLET_SIGN_IN_WITH_BRAVE_WALLET" desc="Sign in with Brave Wallet Title">
|
||||
Sign in with Brave Wallet
|
||||
</message>
|
||||
@@ -3635,16 +3686,13 @@ If you don't accept this request, VPN will not reconnect and your internet conne
|
||||
Try 7 days free
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_PAYWALL_TEXT_1" desc="Brave Origin paywall text">
|
||||
Support Brave's industry-leading work for Web privacy and open-source adblocking lists
|
||||
Support our mission & open-source work
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_PAYWALL_TEXT_2" desc="Brave Origin paywall text">
|
||||
Optimized for a more minimalist browser interface
|
||||
Minimal browser UI centered on Shields
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_PAYWALL_TEXT_3" desc="Brave Origin paywall text">
|
||||
A core of Brave Shields for adblock, privacy, and speed
|
||||
</message>
|
||||
<message name="IDS_ORIGIN_PAYWALL_TEXT_4" desc="Brave Origin paywall text">
|
||||
Support for IT-managed policies at work
|
||||
Maintain core adblock, privacy, & speed
|
||||
</message>
|
||||
<message name="IDS_YEARLY_SUBSCRIPTION_BEST_VALUE" desc="Brave Origin yearly plan best value text">
|
||||
best value
|
||||
|
||||
@@ -3,6 +3,7 @@ include_rules = [
|
||||
"+brave/components/brave_account/features.h",
|
||||
"+brave/components/brave_ads/core/public/ad_units/new_tab_page_ad/new_tab_page_ad_feature.h",
|
||||
"+brave/components/brave_news/common/features.h",
|
||||
"+brave/components/brave_origin/features.h",
|
||||
"+brave/components/brave_rewards/core/features.h",
|
||||
"+brave/components/brave_search_conversion/features.h",
|
||||
"+brave/components/brave_shields/core/common/features.h",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "brave/components/brave_account/features.h"
|
||||
#include "brave/components/brave_ads/core/public/ad_units/new_tab_page_ad/new_tab_page_ad_feature.h"
|
||||
#include "brave/components/brave_news/common/features.h"
|
||||
#include "brave/components/brave_origin/features.h"
|
||||
#include "brave/components/brave_rewards/core/features.h"
|
||||
#include "brave/components/brave_search_conversion/features.h"
|
||||
#include "brave/components/brave_shields/core/common/features.h"
|
||||
@@ -38,34 +39,35 @@
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#define kForceWebContentsDarkMode kForceWebContentsDarkMode, \
|
||||
BRAVE_AI_CHAT_FLAGS \
|
||||
BRAVE_WEB_DISCOVERY_FLAG \
|
||||
&brave_rewards::features::kBraveRewards, \
|
||||
&brave_search_conversion::features::kOmniboxBanner, \
|
||||
&brave_vpn::features::kBraveVPNLinkSubscriptionAndroidUI, \
|
||||
&brave_wallet::features::kNativeBraveWalletFeature, \
|
||||
&playlist::features::kPlaylist, \
|
||||
&download::features::kParallelDownloading, \
|
||||
&preferences::features::kBraveBackgroundVideoPlayback, \
|
||||
&preferences::features::kBravePictureInPictureForYouTubeVideos, \
|
||||
&request_otr::features::kBraveRequestOTRTab, \
|
||||
&safe_browsing::features::kBraveAndroidSafeBrowsing, \
|
||||
&debounce::features::kBraveDebounce, \
|
||||
&webcompat::features::kBraveWebcompatExceptionsService, \
|
||||
&net::features::kBraveHttpsByDefault, \
|
||||
&net::features::kBraveFallbackDoHProvider, \
|
||||
&google_sign_in_permission::features::kBraveGoogleSignInPermission, \
|
||||
&net::features::kBraveForgetFirstPartyStorage, \
|
||||
&brave_shields::features::kBraveShowStrictFingerprintingMode, \
|
||||
&brave_shields::features::kBraveLocalhostAccessPermission, \
|
||||
&brave_shields::features::kBlockAllCookiesToggle, \
|
||||
&brave_shields::features::kBraveShieldsElementPicker, \
|
||||
&features::kBraveAndroidDynamicColors, \
|
||||
&features::kNewAndroidOnboarding, \
|
||||
&brave_ads::kNewTabPageAdFeature, \
|
||||
#define kForceWebContentsDarkMode kForceWebContentsDarkMode, \
|
||||
BRAVE_AI_CHAT_FLAGS \
|
||||
BRAVE_WEB_DISCOVERY_FLAG \
|
||||
&brave_rewards::features::kBraveRewards, \
|
||||
&brave_search_conversion::features::kOmniboxBanner, \
|
||||
&brave_vpn::features::kBraveVPNLinkSubscriptionAndroidUI, \
|
||||
&brave_wallet::features::kNativeBraveWalletFeature, \
|
||||
&playlist::features::kPlaylist, \
|
||||
&download::features::kParallelDownloading, \
|
||||
&preferences::features::kBraveBackgroundVideoPlayback, \
|
||||
&preferences::features::kBravePictureInPictureForYouTubeVideos, \
|
||||
&request_otr::features::kBraveRequestOTRTab, \
|
||||
&safe_browsing::features::kBraveAndroidSafeBrowsing, \
|
||||
&debounce::features::kBraveDebounce, \
|
||||
&webcompat::features::kBraveWebcompatExceptionsService, \
|
||||
&net::features::kBraveHttpsByDefault, \
|
||||
&net::features::kBraveFallbackDoHProvider, \
|
||||
&google_sign_in_permission::features::kBraveGoogleSignInPermission, \
|
||||
&net::features::kBraveForgetFirstPartyStorage, \
|
||||
&brave_shields::features::kBraveShowStrictFingerprintingMode, \
|
||||
&brave_shields::features::kBraveLocalhostAccessPermission, \
|
||||
&brave_shields::features::kBlockAllCookiesToggle, \
|
||||
&brave_shields::features::kBraveShieldsElementPicker, \
|
||||
&features::kBraveAndroidDynamicColors, \
|
||||
&features::kNewAndroidOnboarding, \
|
||||
&brave_ads::kNewTabPageAdFeature, \
|
||||
&ntp_background_images::features::kBraveNTPBrandedWallpaperSurveyPanelist, \
|
||||
&brave_account::features::kBraveAccount
|
||||
&brave_account::features::kBraveAccount, \
|
||||
&brave_origin::features::kBraveOrigin
|
||||
|
||||
// clang-format on
|
||||
|
||||
|
||||
@@ -1288,6 +1288,7 @@ if (is_android) {
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/brave_wallet/BraveWalletUtilsTest.java",
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/homepage/settings/BraveHomepageSettingsTest.java",
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/language/settings/BraveLanguageSettingsTest.java",
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/origin/settings/BraveOriginPreferencesTest.java",
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/privacy/settings/BravePrivacySettingsTest.java",
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/safe_browsing/settings/BraveSafeBrowsingSettingsFragmentTest.java",
|
||||
"//brave/android/javatests/org/chromium/chrome/browser/settings/BraveMainSettingsFragmentTest.java",
|
||||
|
||||
Reference in New Issue
Block a user