Commit Graph
73 Commits
Author SHA1 Message Date
AlexeyBarabash 069bcccc24 [cr148][Android] Move multi-instance shared prefs to a new file and registry
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8c70bd005c9192f75046eb8f57a513e9150a5bcc

commit 8c70bd005c9192f75046eb8f57a513e9150a5bcc
Author: Zhe Li <zheliooo@google.com>
Date:   Mon Mar 16 18:27:53 2026 -0700

    [SharedPrefsMigration] Move multi-instance shared prefs to a new file and registry

    Bug: 438834621
    Change-Id: Ic28dea4ba6dac4068bb4fccc06f31daf835575b9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7669836
    Reviewed-by: Aishwarya Rajesh <aishwaryarj@google.com>
    Commit-Queue: Zhe Li <zheliooo@google.com>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1600256}

https://source.chromium.org/chromium/chromium/src/+/ad0d36681a0f3d4a7359244ec8b21b2b3c4a55a2

commit ad0d36681a0f3d4a7359244ec8b21b2b3c4a55a2
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Mon Jan 26 11:42:34 2026 -0800

    Android: Convert ObservableSupplierImpl usages in misc places (3/3)

    Mostly tests. A few tests tested transitions to null
    on observers that are monotonic, so I removed those cases.

    Bug: 467389696
    Change-Id: Ia60a6c6037abdc2c571d9ffef556b7481e551868
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7513947
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
    Auto-Submit: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1574673}
2026-04-27 12:00:51 +01:00
AlexeyBarabash ba30474cf5 [cr148][Android] New arg hubManagerSupplier at TabbedAppMenuPropertiesDelegate.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/729996f4d16b4a3859c0c162623b7e1b1b1aea43

commit 729996f4d16b4a3859c0c162623b7e1b1b1aea43
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Mon Mar 16 07:51:46 2026 -0700

    [Hub] Remove select_tabs from the overflow menu on non-tabs panes

    This also sets us up to support other "pane specific" customizations in
    the future.

    Fixed: 493182478
    Change-Id: Iab2f3b072ae5fffa3c55c63d8c50afe35f7285a1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7667560
    Reviewed-by: Madhav Pruthi <madhavpruthi@google.com>
    Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Madhav Pruthi <madhavpruthi@google.com>
    Reviewed-by: Dan Polanco <polardz@google.com>
    Cr-Commit-Position: refs/heads/main@{#1599889}
2026-04-27 12:00:49 +01:00
AlexeyBarabash 603447ffe7 Android navbar dynamic color when addressbar bottom (#35877)
* Fixed navigation bar color when address bar is at the bottom

Resolves https://github.com/brave/brave-browser/issues/54934
2026-04-24 22:32:50 +03:00
Serg 90fadf6259 [Android] Register Brave as Android AutofillService for address autofill (#35567)
* [Android] Register Brave as Android AutofillService for address autofill

Re-enables the Android AutofillService that was removed in
https://github.com/brave/brave-core/pull/25759 due to crashes on
split-APK installs. Uses the SplitCompat pattern
(SplitCompatAutofillService base class) so the service works correctly
when installed from the Play Store.

When the user selects Brave as their autofill provider in Android Settings,
Brave can fill saved address profiles into third-party apps and save new
addresses from manually filled forms.

Resolves: https://github.com/brave/brave-browser/issues/41334
2026-04-16 14:23:41 -04:00
samartnik 05208f0893 [cr147][Android] Fix for toolbar shortcuts indexes (#35404)
All toolbar variants (upstream and Brave) are persisted to SharedPreferences as integers.
Upstream guards against shifts by using explicit numeric assignments in the header.
Brave values must do the same — if they are defined implicitly and upstream inserts a new entry above them, the whole range shifts and users lose their saved setting.

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6ef9d2f680a39f97473af883b8fc394b581b6c0

commit c6ef9d2f680a39f97473af883b8fc394b581b6c0
Author: Bhuvana Betini <bbetini@google.com>
Date:   Thu Feb 12 09:55:15 2026 -0800

    [Glic] Add CPA toolbar entrypoint

    This CL implements a baseline CPA entrypoint for Glic on Android. It
    introduces the GlicToolbarButtonController to manage UI and on-click
    handling. Also, it introduces the GlicActionProvider for future
    conditional cueing logic. The dataflow integrates Glic into the
    segmentation platform model to allow for conditional button display and
    registers the new button type in histogram metrics for tracking.

    Because the flag is not by set by native and the button is added to
    the toolbar, a Cached Flag is used to prevent NPEs for unit tests.

    In future CLs, the Glic button will have proper styling, be hooked up to
    bottom sheet, and use data from contextual_cueing_service to be
    conditionally shown.

    Bug: 475590295
    Change-Id: Ic31cd0c7ab1428abc679e330e6da86cb8531914c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7551433
    Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
    Commit-Queue: Bhuvana Betini <bbetini@google.com>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1584071}
2026-04-09 18:07:14 -04:00
AlexeyBarabash b62ded55b4 [Android][DynamicColors] Fixed the navigation bar color (#35251)
* [Android][DynamicColors] Fixed the navigation bar color

Resolves https://github.com/brave/brave-browser/issues/53758
2026-04-08 19:24:02 +03:00
Anton Paymyshev ae9c1a1949 Completely remove kNativeBraveWalletFeature (#35261) 2026-04-08 22:09:45 +07:00
samartnik 187abd2b8a [Android] Add support for custom search engines (#35171)
* [Android] Add support for custom search engines

* [Review] Optimise check for delete eligibility
2026-04-02 10:03:42 -04:00
Artem Samoilenko b77452971c [cr147][Android] Clean up readAloud flag
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/02a7da5a873e131e66aebfa63936aa67813d479e

commit 02a7da5a873e131e66aebfa63936aa67813d479e
Author: Eleanor Lee <eleanorlee@google.com>
Date:   Tue Mar 3 09:32:38 2026 -0800

    [Community Contributions] Clean up readAloud flag

    Bug: 473625235
    Change-Id: I483709e8d1a53ae8179e365eff5e1747a2e673ed
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7619445
    Reviewed-by: Shlomi Ben Shimon <shlomib@google.com>
    Reviewed-by: Theresa Sullivan <twellington@chromium.org>
    Commit-Queue: Eleanor Lee <eleanorlee@google.com>
    Cr-Commit-Position: refs/heads/main@{#1593284}
2026-03-26 19:55:40 -04:00
Artem Samoilenko d4b0c4552c [cr147][Android] Remove NewTabPageCustomization flag
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/510d1760edda927f69332c4525ad6cee5891dbaa

commit 510d1760edda927f69332c4525ad6cee5891dbaa
Author: Yanling <yanlinghu@google.com>
Date:   Fri Feb 27 12:11:43 2026 -0800

    [Ntp Customization] Remove feature flag

    This CL removes the NewTabPageCustomization feature flag and hardcode
    its enabled behavior.

    Bug: b:376238770
    Change-Id: Id267cb2fb71cf254deb9149ba1813344495e7d56
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7600592
    Reviewed-by: Carlos Knippschild <carlosk@chromium.org>
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Reviewed-by: Xi Han <hanxi@chromium.org>
    Commit-Queue: Yanling Hu <yanlinghu@google.com>
    Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1591730}
2026-03-26 19:55:23 -04:00
Artem Samoilenko 46e604c31f [cr147][Android] Fix for BraveTabbedAppMenuPropertiesDelegateUnitTest
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/7967f3f9d03e36529a74ece2807f3b82b3bb8537

commit 7967f3f9d03e36529a74ece2807f3b82b3bb8537
Author: Brandon Wylie <wylieb@chromium.org>
Date:   Thu Jul 31 15:14:43 2025 -0700

    [reader mode] Include the always-on entrypoint when disitlling in-app

    Bug: 435259543
    Change-Id: I55c00d11347664cf79c18d29bd22dee4916133c8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6804058
    Reviewed-by: Sky Malice <skym@chromium.org>
    Commit-Queue: Brandon Wylie <wylieb@google.com>
    Cr-Commit-Position: refs/heads/main@{#1495118}
2026-03-26 19:25:25 -04:00
Artem Samoilenko 343e5ed4e5 [cr147][Android] Fixes for BraveTabbedAppMenuPropertiesDelegateUnitTest
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0a7f43e2972540c2e3f6ee21315ed32335689cce

commit 0a7f43e2972540c2e3f6ee21315ed32335689cce
Author: Eleanor Lee <eleanorlee@google.com>
Date:   Mon Jan 26 13:46:51 2026 -0800

    [Entry Point] Wire up default browser promo menu items in app menu & settings

    <App Menu>
    After:
    https://screencast.googleplex.com/cast/NTQ0MTExNTcxNjA1OTEzNnxmNjFjNGIyMy01Mw

    0) Chrome is initially not set to default.
    1) The menu item ("Make Chrome default") is visible.
    2) First tap in the menu item -> Role Manager Dialog appears (since I cleared the app storage).
    3) Close the dialog without setting Chrome to default.
    4) Second tap in the menu item -> leads to the default browser page.
    5) Set Chrome to default.
    6) When we return back to the app menu, the menu item is not visible.

    <Settings>
    After:
    https://screencast.googleplex.com/cast/NDkwNTE2NDA2MTI3ODIwOHw0OGY3MGFhNy04Mg

    0) Chrome is initially not set to default.
    1) The menu item ("Default browser") is visible.
    2) Tap the menu item -> leads to the default browser page.
    3) Set Chrome to default.
    4) When we return back to settings, the menu item is still visible.

    Bug: 477109693
    Change-Id: I2883f8ad43a426388b19f8421b917e82e0b0b8f4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7495581
    Reviewed-by: Lijin Shen <lazzzis@google.com>
    Commit-Queue: Eleanor Lee <eleanorlee@google.com>
    Reviewed-by: Theresa Sullivan <twellington@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1574758}
2026-03-26 19:25:16 -04:00
Artem Samoilenko 7075720814 [cr147][Android] Changes for the new adaptive toolbar button variant
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6ef9d2f680a39f97473af883b8fc394b581b6c0

commit c6ef9d2f680a39f97473af883b8fc394b581b6c0
Author: Bhuvana Betini <bbetini@google.com>
Date:   Thu Feb 12 09:55:15 2026 -0800

    [Glic] Add CPA toolbar entrypoint

    This CL implements a baseline CPA entrypoint for Glic on Android. It
    introduces the GlicToolbarButtonController to manage UI and on-click
    handling. Also, it introduces the GlicActionProvider for future
    conditional cueing logic. The dataflow integrates Glic into the
    segmentation platform model to allow for conditional button display and
    registers the new button type in histogram metrics for tracking.

    Because the flag is not by set by native and the button is added to
    the toolbar, a Cached Flag is used to prevent NPEs for unit tests.

    In future CLs, the Glic button will have proper styling, be hooked up to
    bottom sheet, and use data from contextual_cueing_service to be
    conditionally shown.

    Bug: 475590295
    Change-Id: Ic31cd0c7ab1428abc679e330e6da86cb8531914c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7551433
    Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
    Commit-Queue: Bhuvana Betini <bbetini@google.com>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1584071}
2026-03-26 19:25:06 -04:00
Simone Arpe 3f35655f1d Implement new layout for widget search promo panel (#34207)
Implements new layout for widget search promo panel and introduces better handling of activity recreations and configuration changes to redraw the widget search promo panel with correct theme (day/night) and proper position.

Other notable enhancements:

- Tweak tablet margins to better frame the onboarding cards on foldable devices after initial review with the design team.
- Fix post-FRE intent and delay activity to avoid a glitch on foldable devices by following the same strategy applied upstream.
- Accessibility: include content descriptions for widget search promo panel images.
- Nala: include new drawables from Nala tokens.
- Append new source android-widget for all searches made from the widget.
- Implement tests to verify new source android-widget.
2026-02-27 13:45:17 +01:00
AlexeyBarabash 7329263323 [cr146][Android] Rename ObservableSupplier -> MonotonicObservableSupplier
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b8cb84d2901aeffc0003b15622a3052de7a20023

	Rename ObservableSupplier -> MonotonicObservableSupplier

	Bypass-Check-License: Rename
	Change-Id: I101e53b7542d56566c128c23e6d6b081bcd3348c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487973
2026-02-26 14:14:55 +00:00
AlexeyBarabash 60e1c669e4 [cr146][Android] Change at ReturnToChromeUtil
shouldShowNtpAsHomeSurfaceAtStartup method has new persistableBundle
argyment

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c2c3eb60bfae7281db65395756660c8977378714

	Explicitly disallow start surface after app update when restoring persistent state

	When a window is restored as part of the persistAcrossReboots feature,
	the start surface may be shown afterwards. This change prevents the
	start surface from being shown if the persistent state indicates that
	the window was restored after an app update, in order to minimize any
	disruptions.

	Bug: 459921316
	Change-Id: Ib02ef3277d3d536479cab4ae5c877c07b74d5dae
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7534264
2026-02-26 14:14:53 +00:00
AlexeyBarabash 240f8280a9 [cr146][Android] Make ObservableSupplierImpl package-private
AI-assited change

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/be70d7b2ff247382d6716d687e2ccffec3e080ec

	Android: Make ObservableSupplierImpl package-private

	Bug: 467389696
	Change-Id: I6d8cce7f71f520d2ee5e43f87f8225cb71bef863
	Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7546004
2026-02-26 14:14:53 +00:00
AlexeyBarabash e107ef2424 [cr146][Android] Fixed BraveTabbedAppMenuPropertiesDelegateUnitTest
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/e9b66588061acba6de9417f298e398877eae420e

	[TabBottomSheet] Define Glic Button and Add to 3-dot menu Icon row

	Bug: 475592538
	Change-Id: Ia85a0ae72abb8a7cff20a460807be285ce663d9d
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7474125
2026-02-26 14:14:50 +00:00
AlexeyBarabash 2304174ac8 [cr146][Android] isInNarrowWindowOnTablet was moved from NewTabPageLayout to NtpCustomizationUtils`
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/23c8fddd48102899160ce4d71b1ab1949c88a248

	[Theme] Add NtpCustomizationPolicyManager.

	In this CL, we add NtpCustomizationPolicyManager which listens to
	Pref.NTP_CUSTOM_BACKGROUND_DICT changes.
	1) Pref.NTP_CUSTOM_BACKGROUND_DICT being managed means the
	   policy::key::NTPCustomBackgroundEnabled is disabled.
	2) When the policy NTPCustomBackgroundEnabled changes,
	   NtpCustomizationPolicyManager saves the latest policy value to the
	   shared preference. It will apply after relaunch chrome. This allows
	   the UI correct when CTA isn't recreated.
	Demo: http://shortn/_nBBqRNFS3N

	Bug: 467029432
	Change-Id: I04a50d0d814802fbd3ef8be29414a17181adae98
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7500251
2026-02-26 13:47:51 +00:00
AlexeyBarabash d4db7fcba4 [cr146][Android] openInAppMenuItemProvider arg at TabbedAppMenuPropertiesDelegate.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c66c93e16c77f0357a729ea2bd39a05ce95af5ef

	[Link Capturing] Create Open in App entry point classes

	Low-Coverage-Reason: TESTS_IN_SEPARATE_CL New code isn't yet fully implemented
	Bug: 450253146
	Change-Id: I8eb1ebe754e3b244c2fa0b426597bdbc605aa071
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7426174
2026-02-26 13:47:50 +00:00
AlexeyBarabash 9672ff26f1 [cr146][Android] Removed PROPAGATE_DEVICE_CONTENT_FILTERS_TO_SUPERVISED_USER feature
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/6162dcf447020baf2795a6974fc28be4e0b9274b

	Clean up Android Parental Controls MVP features.

	The feature was launched in M143 (cr/821645411; crrev.com/c/7054262).

	Bug: 405328417
	Change-Id: I2786cc946e07af7bc18743ae9fe846671e6eedfc
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7509887
2026-02-26 13:47:49 +00:00
AlexeyBarabash ff3e9df6a1 [cr146][Android] Rename ObservableSupplier -> MonotonicObservableSupplier
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b8cb84d2901aeffc0003b15622a3052de7a20023

	Rename ObservableSupplier -> MonotonicObservableSupplier

	Bypass-Check-License: Rename
	Change-Id: I101e53b7542d56566c128c23e6d6b081bcd3348c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7487973
2026-02-26 13:47:45 +00:00
Serg a756a49988 [Android] Fix for NTP idle snackbar shows when opening external links from other apps. (#33847)
[Android] Fix for NTP idle snackbar shows when opening external links
from other apps. When the NTP idle experiment (variants B/C) is active
and the inactivity threshold has been reached, opening a link from an
external app should not show an NTP+snackbar.

Resolves: https://github.com/brave/brave-browser/issues/52746
2026-02-10 21:24:58 +00:00
Serg 461d66e02c [Android] Shows Brave Wallet UI based on policy. (#33630)
* [Android] Shows Brave Wallet UI based on policy.

Resolves: https://github.com/brave/brave-browser/issues/52496
2026-02-04 10:08:30 -05:00
Artem Samoilenko 99b9265c0e [cr145][Android] Fixes for BraveVpnParentActivityTest
This fixes the following error:
C 07:43:50.007   21.797s Main   1| java.lang.IllegalArgumentException: SemanticColorUtils requires a value for the brave.junit.tests:attr/colorSurface attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).
C 07:43:50.007   21.797s Main   1| 	at com.google.android.material.resources.MaterialAttributes.resolveTypedValueOrThrow(MaterialAttributes.java:72)
C 07:43:50.007   21.797s Main   1| 	at com.google.android.material.color.MaterialColors.getColor(MaterialColors.java:94)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.components.browser_ui.styles.SemanticColorUtils.resolve(SemanticColorUtils.java:33)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.components.browser_ui.styles.SemanticColorUtils.getDefaultBgColor(SemanticColorUtils.java:43)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.chrome.browser.ChromeBaseAppCompatActivity.initializeSystemBarColors(ChromeBaseAppCompatActivity.java:315)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.chrome.browser.ChromeBaseAppCompatActivity.onCreate(ChromeBaseAppCompatActivity.java:251)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.chrome.browser.init.AsyncInitializationActivity.abortLaunch(AsyncInitializationActivity.java:453)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreateInternal(AsyncInitializationActivity.java:419)
C 07:43:50.007   21.797s Main   1| 	at org.chromium.chrome.browser.init.AsyncInitializationActivity.onCreate(AsyncInitializationActivity.java:344)
C 07:43:50.007   21.797s Main   1| 	at android.app.Activity.performCreate(Activity.java:9155)
C 07:43:50.007   21.797s Main   1| 	at android.app.Activity.performCreate(Activity.java:9133)
C 07:43:50.007   21.797s Main   1| 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1521)
C 07:43:50.007   21.797s Main   1| 	at org.robolectric.android.internal.RoboMonitoringInstrumentation.callActivityOnCreate(RoboMonitoringInstrumentation.java:377)
C 07:43:50.007   21.797s Main   1| 	at org.robolectric.android.controller.ActivityController.lambda$create$0(ActivityController.java:136)
C 07:43:50.007   21.797s Main   1| 	at org.robolectric.shadows.ShadowPausedLooper.runPaused(ShadowPausedLooper.java:264)
C 07:43:50.007   21.797s Main   1| 	at org.robolectric.android.controller.ActivityController.create(ActivityController.java:134)
C 07:43:50.007   21.797s Main   1| 	at org.robolectric.android.controller.ActivityController.create(ActivityController.java:144)
C 07:43:50.007   21.798s Main   1| 	at org.chromium.chrome.browser.vpn.activities.BraveVpnParentActivityTest.testShouldBringToTop_TrueForProfileActivity(BraveVpnParentActivityTest.java:26)
2026-01-29 13:41:09 -05:00
Artem Samoilenko b9e0a878bd [cr145][Android] Move StripVisibilityState to an enum target
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/893aacfca42016ae203f5ca51866b070b866e568

commit 893aacfca42016ae203f5ca51866b070b866e568
Author: Wenyu Fu <wenyufu@chromium.org>
Date:   Mon Dec 29 15:34:38 2025 -0800

    Move StripVisibilityState to an enum target

    This allows the enum live closer to the `//c/b/u/a/tabstrip` component,
    and avoid building the circular dependency around `//c/b/u/a/tabstrip`
    and `//c/b/u/a/toolbar`.

    Bypass-Check-License: File move
    Bug: N/A
    Change-Id: If51f5edbb46cde77186552793c0a8e7f95e1aa1e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7330486
    Reviewed-by: Charles Hager <clhager@google.com>
    Commit-Queue: Wenyu Fu <wenyufu@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1563255}
2026-01-29 13:41:06 -05:00
Artem Samoilenko 06f7a77a02 [cr145][Android] Changes for ActivityTabProvider in robolectric tests
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/416a61c418c152a7a7ae568d89302e5ecb6e4a3d

commit 416a61c418c152a7a7ae568d89302e5ecb6e4a3d
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Tue Dec 2 14:13:59 2025 -0800

    Android: Split ObservableSupplier into Nullable / Monotonic / NonNull variants

    The goal is to use proper @Nullable annotations with
    ObservableSuppliers.

    To achieve this, we use interfaces that define nullness:
     * (Settable)NullableObservableSupplier
     * (Settable)ObservableSupplier <-- monotonic
     * (Settable)NonNullObservableSupplier

    And we have ObservableSupplierImpl implement all of them.

    In order to make this migration manageable, I've marked the interfaces
    as @NullUnmarked, and will fix annotations in batches until they
    can be marked @NullMarked.

    This CL includes a batch in order to test out the new interfaces (and
    because many were necessary to make the change).

    Monotonic suppliers are by far the most common afaict, so that's why
    the non-prefixed ObservableSupplier is the monotonic one (that, and
    because "Monotonic" is a mouthful).

    One implication of this approach is that we'll never have:
       ObservableSupplier<@Nullable Foo>
    We'd have instead:
       NullableObservableSupplier<Foo>

    Having the nullness in the interface rather than in the generic
    allows for defining toNonNull() only on monotonic suppliers, and
    simplifies the implementation.

    Bug: 455874046
    Change-Id: Id48e235b9ff16a5b21a9c1199863150d17c22736
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206746
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1553094}
2026-01-29 13:41:00 -05:00
Artem Samoilenko 447aef2500 [cr145][Android] Remove TabGroupModelFilterProvider
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f12fd21bbaa4ecdd44a76d39e37e086c198664f1

commit f12fd21bbaa4ecdd44a76d39e37e086c198664f1
Author: Hitarth Kothari <hitarthkothari@google.com>
Date:   Mon Dec 29 11:13:11 2025 -0800

    Reland "Remove TabGroupModelFilterProvider"

    This is a reland of commit f00182307d3765bac09f1bc45488c75f423607a2

    Original change's description:
    > Remove TabGroupModelFilterProvider
    >
    > Bug: 467323363
    > Change-Id: I34d003bdf8ef089b9b5a9a77020a68953dc00888
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7302039
    > Reviewed-by: Fiaz Muhammad <mfiaz@google.com>
    > Commit-Queue: Hitarth Kothari <hitarthkothari@google.com>
    > Owners-Override: Hitarth Kothari <hitarthkothari@google.com>
    > Cr-Commit-Position: refs/heads/main@{#1562275}

    Bug: 467323363
    Change-Id: Ie8090229572ec1b97e21cfbbb53aef578d4037da
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7349423
    Reviewed-by: Fiaz Muhammad <mfiaz@google.com>
    Owners-Override: Hitarth Kothari <hitarthkothari@google.com>
    Commit-Queue: Hitarth Kothari <hitarthkothari@google.com>
    Cr-Commit-Position: refs/heads/main@{#1563178}
2026-01-29 13:41:00 -05:00
Artem Samoilenko 975eb9727a [cr145][Android] Bottom toolbar flag was removed in enabled state
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/4ea609b7821c981b94af08b5a7102d7dac3c6b8a

commit 4ea609b7821c981b94af08b5a7102d7dac3c6b8a
Author: Eleanor Lee <eleanorlee@google.com>
Date:   Fri Dec 5 14:06:09 2025 -0800

    [Community Contributions] Clean up android bottom toolbar flags

    Change-Id: I1dc1fccd5787385983b0ac795fe8489251b0df6c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7230698
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Commit-Queue: Eleanor Lee <eleanorlee@google.com>
    Cr-Commit-Position: refs/heads/main@{#1554924}
2026-01-29 13:40:26 -05:00
Serg 4ab77b35ea [Android] Shows Brave VPN UI based on policy. (#33467)
Resolves: https://github.com/brave/brave-browser/issues/52355
2026-01-28 18:56:10 +00:00
Serg e68153b672 [Android] Checks origin pref policies directly for Leo AI and Rewards. (#33392)
Currently there is an async mojo call to check policies for Leo and
Rewards, that is an overhead and not needed, in fact it could be wrong
if the policies controlled by something else that is not Origin.
Resolves: https://github.com/brave/brave-browser/issues/52244
2026-01-23 20:59:10 +00:00
Serg ec99d6c72e [Android] Shows Brave News UI based on policy. (#33342)
Resolves: https://github.com/brave/brave-browser/issues/52170
2026-01-21 21:48:09 +00:00
samartnik bd2d4b53df [cr144][Android] Additional fixes for adaptive toolbar buttons (#33066)
* [cr144][Android] Additional fixes for adaptive toolbar buttons

This is additional fixes for the following change https://github.com/brave/brave-core/commit/de0e4fcc2f620c6c725093ab5626adb9b120e061

* Presubmit fixes

* Additional presubmit fixes
2026-01-07 15:41:18 -05:00
Serg 81387558a0 [Android] Crash on app reviews (#32973)
Fixes a crash on app reviews in certain cases.
Resolves: https://github.com/brave/brave-browser/issues/51708
2025-12-30 13:26:49 -05:00
vadims f5e7f4b14a [Shred] shred android UI changes add contextual menu (#32834)
Added an ability to start shred manually from two places:
- tab's context menu (includes support of the menu customization)
- tab switch mode
Added confirmation dialog before the site data shred operation

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

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2025-12-17 12:49:24 +01:00
AlexeyBarabash 855a518957 [Android] Fix for misaligned MVT area (#32806)
* [Android] Fix for misaligned MVT area

Regression was introduced between
`Nightly v1.85.63 (Chromium 141.0.7390.108)` and
`Nightly v1.85.70 (Chromium 142.0.7444.23)`.

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

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/90a9724173475c0c3913a7cb9ca619d2458b1d08

	[SurfacePolish][CleanUp] Clean up surface polish code for MVT (Part 3)

	This CL represents part 3 of the cleanup for the surface polish code in
	the MVT, focusing on refining the code associated New tab page.

	Low-Coverage-Reason: TRIVIAL_CHANGE This CL cleans up the NewTabPageLayout code by deleting unused code and updating variable names.
	Bug: 331667743
	Change-Id: Idaaab489aa72714d4cd294ac86cc86b1dbe20065
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5591789
2025-12-12 21:56:46 +00:00
Serg a7554c1c74 [Android] Enable in-app updates for Android 14+ devices (#32648)
- Migrate in-app reviews to `com.google.android.play:review:2.0.1`
- Migrate in-app updates to `com.google.android.play:app-update:2.1.0`
- Turn on in-app updates for all supported devices
- Remove `com.google.android.play:core` dependency

Resolves https://github.com/brave/brave-browser/issues/51187
2025-12-05 14:01:39 -05:00
Brian R. Bondy a4d9248fcb Add enable_brave_wallet gn var and build flag (#32484)
* Add enable_brave_wallet GN variable and build flag

This adds a new GN build flag 'enable_brave_wallet' that can be set to
false to exclude Brave Wallet from the build. The flag is true by default
to maintain current behavior.

Changes include:
- Add enable_brave_wallet declare_args in build/config/BUILDCONFIG.gn
- Create brave_wallet/common/buildflags with ENABLE_BRAVE_WALLET flag
- Update all BUILD.gn and sources.gni files to use the new flag
- Add wallet buildflags dependencies via minimal one-line imports

* Add patches for wallet buildflags in Chromium BUILD files

Adds minimal one-line patches to import wallet buildflags dependencies
in Chromium source files. This allows Chromium code to conditionally
depend on wallet headers.

Patches:
- chrome/browser/ui/hid/BUILD.gn
- net/BUILD.gn
- third_party/blink/common/BUILD.gn
- third_party/blink/public/common/BUILD.gn
- third_party/blink/renderer/modules/permissions/BUILD.gn

* Guard wallet code in Chromium source overrides

Updates chromium_src overrides to conditionally compile wallet-related
code based on enable_brave_wallet flag. This includes:

- Adding DEPS files to allow buildflags dependencies
- Guarding wallet permission handling with #if BUILDFLAG(ENABLE_BRAVE_WALLET)
- Keeping wallet permission enum values unconditionally to maintain profile
  interchangeability between wallet-enabled and wallet-disabled builds
- Updating component registration and preference handling

Key changes:
- Permission enums remain stable across build configs for UMA and persistence
- Wallet permission handling code only compiled when wallet enabled
- DEPS files updated to allow buildflags includes

* Guard wallet UI code in front-end TypeScript and Mojom

Conditionally compiles wallet-related UI code in TypeScript and Mojom
interfaces based on enable_brave_wallet preprocessor flag.

Changes:
- Settings menu: Use lastInserted pattern for menu item ordering
- Page visibility: Guard wallet page visibility checks
- Browser commands: Guard wallet command handling
- Routes: Conditionally include wallet routes
- Add non-null assertions for DOM insertions in TypeScript
- Update Mojom interfaces to conditionally include wallet enums

Front-end code uses <if expr="enable_brave_wallet"> preprocessor
directives to exclude wallet UI when the feature is disabled.

* Guard wallet usage in non-wallet Brave code

Conditionally compiles wallet-related code in non-wallet Brave files
based on enable_brave_wallet build flag.

Changes include:
- browser/: Guard wallet service factories, preferences, and helpers
- components/: Guard wallet dependencies in rewards, sidebar, and DNS
- renderer/: Conditionally register wallet content settings
- utility/: Guard wallet component registration
- ios/: Add optional chaining for wallet feature flags
- test/: Guard wallet-related test code

Key files:
- brave_stats_updater.cc: Guard wallet pref registration with #if
- brave_profile_prefs.cc: Conditionally register wallet preferences
- sidebar_service.cc: Guard wallet panel items
- iOS WalletConstants.swift: Use optional chaining for feature checks

This allows building Brave without wallet while maintaining profile
compatibility between wallet-enabled and wallet-disabled builds.

* Add static_assert for ENABLE_BRAVE_WALLET in wallet headers

Adds compile-time assertions to wallet headers to ensure they are only
included when wallet is enabled. This prevents accidental usage of wallet
APIs when enable_brave_wallet=false.

Added static_assert(BUILDFLAG(ENABLE_BRAVE_WALLET)) to:

browser/brave_wallet/ (11 files):
- asset_ratio_service_factory.h
- brave_wallet_context_utils.h
- brave_wallet_ipfs_service_factory.h
- brave_wallet_provider_delegate_impl.h
- brave_wallet_service_factory.h
- brave_wallet_tab_helper.h
- meld_integration_service_factory.h
- wallet_notification_service_factory.h
- simulation_service_factory.h
- swap_service_factory.h
- wallet_data_files_installer_delegate_impl.h

components/brave_wallet/browser/ (15 files):
- brave_wallet_p3a_private.h
- brave_wallet_prefs.h
- brave_wallet_service.h
- brave_wallet_utils.h
- ens_resolver_task.h
- json_rpc_service_test_utils.h
- json_rpc_service.h
- keyring_service_observer_base.h
- keyring_service.h
- network_manager.h
- permission_utils.h
- pref_names.h
- test_utils.h
- tx_service.h
- wallet_data_files_installer.h

components/brave_wallet/common/ (6 files):
- brave_wallet_types.h
- common_utils.h
- eth_abi_utils.h
- features.h
- hex_utils.h
- pref_names.h

Also includes minor wallet code updates to use buildflags and
guard zcash-specific test code.

* Follow up fixes after Parts 1-7
2025-11-28 15:54:27 -05:00
samartnik 57dfa92d42 [Android] Respect the user choice on DMA search choice screen (#32532) 2025-11-25 13:44:42 -05:00
samartnik dc731eb5a3 [Android] New privacy-preserving uac codes (#32456)
* [Android] New privacy-preserving uac codes

* Move BraveReferrer to the referrer folder

* Presubmit fixes
2025-11-24 14:06:39 -05:00
Serg 86a4887089 Android new tab page ab test (#32464)
* [Android] Fresh NTP after idle experiment.

Introduces 4 different variants whether to show NTP or not when Brave
is foregrounded.
Resolves: https://github.com/brave/brave-browser/issues/50989
2025-11-21 17:32:50 -05:00
Artem Samoilenko 8960dde4a4 [cr143][Android] Changes for getHomepageGurl function
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/44ddbe47979f8666bab37421169024fa8e71ba90

commit 44ddbe47979f8666bab37421169024fa8e71ba90
Author: Fiaz Muhammad <mfiaz@google.com>
Date:   Thu Oct 23 14:23:40 2025 -0700

    Reland "[Url Override] Make Home Button Accommodate URL Overrides"

    This reverts commit eef7c48e9574450e3f7a65b11163f0af698e36e4.

    Reason for revert: fixed breaking issue.

    Original change's description:
    > Revert "[Url Override] Make Home Button Accommodate URL Overrides"
    >
    > This reverts commit 4441f0ae1bd7854aff7456d78c565d76771d83ad.
    >
    > Reason for revert: Breaks downstream build
    >
    > Original change's description:
    > > [Url Override] Make Home Button Accommodate URL Overrides
    > >
    > > - The Home Button does not currently work with URL Overrides.
    > > - This ties the getNtpUrl functionality with incognito status.
    > >     We choose incognito status instead of Profiles, since this
    > >     operation is also performed pre-native for both incognito and
    > >     non-incognito windows.
    > > - We also now expose the resolvers directly.
    > > - Delete ChromeUrlConstants and and its unused module.
    > >
    > > Bug: 454104029
    > > Change-Id: Ie5c9ce10d9f9831460e5b425262ad53bd045ff10
    > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7076032
    > > Auto-Submit: Fiaz Muhammad <mfiaz@google.com>
    > > Reviewed-by: Sky Malice <skym@chromium.org>
    > > Commit-Queue: Fiaz Muhammad <mfiaz@google.com>
    > > Cr-Commit-Position: refs/heads/main@{#1534372}
    >
    > Bug: 454104029
    > No-Presubmit: true
    > No-Tree-Checks: true
    > No-Try: true
    > Change-Id: I8f79a4e988504fb142bc2e45e0fbb6c3b155cc8a
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7078876
    > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    > Commit-Queue: Patrick Noland <pnoland@chromium.org>
    > Reviewed-by: Fiaz Muhammad <mfiaz@google.com>
    > Cr-Commit-Position: refs/heads/main@{#1534386}

    Bug: 454104029
    Change-Id: I9e7b5e754ee1eaea95ff08a5cc58994181619237
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7080251
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Fiaz Muhammad <mfiaz@google.com>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1534614}
2025-11-18 11:27:37 -05:00
Artem Samoilenko 45b6f14f76 [cr143][Android] SyncService.hasUnrecoverableError was removed
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/9857d221a38d5965cbe7d54c0a8f7e37a1a8634c

commit 9857d221a38d5965cbe7d54c0a8f7e37a1a8634c
Author: Mahmoud Rashad <mmrashad@google.com>
Date:   Tue Oct 14 06:43:47 2025 -0700

    Adopt getUserActionableError() in getSyncStatusSummary()

    A few users could have different sync status summary after this change,
    due to the change in the order of the error checks. This piece of code
    won't be reached soon, as syncing users are getting migrated.

    This CL also removes the last usage of some of SyncServiceAndroidBridge
    functions, which got removed.

    Bug: 40890809
    Change-Id: I1b55de12330151c8f505c49250471d45a6729931
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7031946
    Reviewed-by: Marc Treib <treib@chromium.org>
    Commit-Queue: Mahmoud Rashad <mmrashad@google.com>
    Cr-Commit-Position: refs/heads/main@{#1529488}
2025-11-18 11:19:00 -05:00
Simone Arpe e2e5bde6e9 (Wallet) Perform refactoring of DApp fragments (#32146)
Introduces a unified Wallet-fragment architecture that centralizes how Brave's Android wallet UI talks to WalletModel, manages pending transactions, and stays in sync with keyring state.
2025-10-31 19:12:39 +01:00
Oliver 8432924a73 [Android] Fix VPN Enrollment screens not closing (#31973)
Previously, we removed a call to bringChromeTabbedActivityToTheTop in
order to prevent closing the server country selection dialog.

However, this introduced a regression in that the enrollment screens
which depend on this call no longer close and the user would resultantly
have to back out of them.

Now, we conditionally invoke the call unless the activity is coming from
either the country selection or city selection dialog.

Unit tests have been added to verify the behaviour.

Resolves brave/brave-browser#50163
2025-10-24 18:55:17 +01:00
AlexeyBarabash 2de661e1f9 [cr142] Fixed open Mobile bookmarks folder as home page (#31967)
* [cr142] Fixed open Mobile bookmarks folder as home page

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

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7e28ed8607fec26cac4ab4dbc6c43f46f14bfe7b

	components/bookmark_codec: start writing sha256

	Writepath changes: Start writing SHA256 alongside MD5. Readpath changes:
	Read MD5 and optionally SHA256.

	After a couple of milestones, intended change is to stop writing the md5
	but continue reading both. A few milestones after that, stop reading
	md5.

	Include `EnableBookmarkCodecSHA256` in case this cl needs to be disabled
	via go/finch-killswitch.

	Enabled-by-default-reason: killswitch EnableBookmarkCodecSHA256
	Bug: 426243026
	Change-Id: Ie545e1a3563dc3add88408899a6704016276e901
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6710952
2025-10-23 15:57:15 +03:00
AlexeyBarabash 1316c2e8a4 [cr142][Android] Page zoom changes
- new arg pageZoomManager at TabbedAppMenuPropertiesDelegate.ctor;
- PageZoomBarCoordinator.setShouldShowMenuItemForTesting removed.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/3479fccbd03d5c3e91992c44a35a4400abc314b7

	[Zoom Indicator] Add new zoom menu item into the app overflow menu

	Demo: http://screencast/cast/NjY1ODk2NzEzMTM4OTk1Mnw3YTgwYjIwNC0zNw

	Bug: 442550691
	Change-Id: Id5882d1ea4f8a518dee6934876500ffa882329fa
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6923167
2025-10-15 20:31:21 -04:00
AlexeyBarabash b779101cab [cr142][Android] Refactor: PageZoomMediator into PageZoomManager
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/0c651056ab343b0d0878706311928117ad1ce0b4

Refactor: PageZoomMediator into PageZoomManager

By decoupling PageZoomCoordinator and PageZoomManager, we can create a
single PageZoomManager to be shared between multiple zoom entry points.
This also allows us to set java level listeners to monitor changes in
zoom levels.

Bug: 443714728
Change-Id: Id9eb91bd46cd8d345d9ab8cdfdf163e696fc0d97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6926402
2025-10-15 20:30:59 -04:00
AlexeyBarabash 1351d19228 [cr142][Android] PausedExecutorTestRule was removed
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/468a130e04e7c9f15bbc597271b404045c4179d9

	[Android] Replace usages of PausedExecutorTestRule

	BaseRobolectricTestRule has the same functionality.

	Bug: 40934211
	Change-Id: Ib0f4df3c59b13b353756b74d19c8d6814b272cdd
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6857364
2025-10-15 18:32:09 -04:00
samartnik 913ac8df16 [Android] Disable quick shortcut toggle by default (#31567)
* [Android] Disable quick shortcut toggle by default

* Fixes for JUnit tests
2025-10-02 06:39:03 -04:00