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.
[Android] Adds kBraveFreshNtpAfterIdleExpirement experiment flag.
That commit adds the flag with parameters and a functionality
to use cached flags on Android.
Resolves: https://github.com/brave/brave-browser/issues/50567
Previously, the import/export icons were not correctly tinted when the
Android OS was set to dark mode.
To correct this, the icons no longer use a hard-coded fill colour and an
iconTint property is applied in order to leverage the built-in support
that Chromium has for automatically adjusting icons for light/dark mode.
The icons have also been replaced with the upload/download SVG paths
from the brave/leo repo.
Resolvesbrave/brave-browser#50232
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.
Resolvesbrave/brave-browser#50163
* [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
Previously in af14cfe912 we fixed the
server selection dialog and prevented dialog closure when the user
selects an option.
As a result, the city selection dialog also needed code added to ensure
that it updated when the user selected an option. This commit implements
that change in the same manner as the aforementioned one.
Resolvesbrave/brave-browser#50159
Occasionally, users have reported that the NTP (New Tab Page) background
image is partially cut-off after restarting the app.
It now appears likely that this is being caused by the call to
`removeOnGlobalLayoutListener(this)` which results in nothing happening
when the background image needs to be resized.
This commit deletes the line that unregisters the listener and instead
adds code that checks if the measured height/width of the background
image differs from the values in a previous run. If they are different,
we re-fetch the image. We delete the listener when the window goes
away instead.
Fixes DApp activity flags by making the status bar not translucent and optimizes the fragment container view. Tested also on the new Android API 35 where the status bar is
thicker.
Simplifies the wallet sign message UI by consolidating DAppsMessageFragment and SignMessagePagerAdapter into SignMessageFragment removing unnecessary abstraction layers.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c818a3850128c73f62537482e36f43367e9c40ce
commit c818a3850128c73f62537482e36f43367e9c40ce
Author: Tomasz Wiszkowski <ender@google.com>
Date: Fri Oct 3 15:11:19 2025 -0700
Ensure all StatusIcons meet the specific size constraint.
We've observed a weird behavior when toggling search engines results
in oversize and cropped search engine icon shown in the omnibox.
This is partially because the ChromeTransitionDrawable animating
between states receives Drawables of inconsistent sizes, and changes
its intrinsic size, trying to accommodate the larger of the drawables.
Second more important factor is that the StatusIconResource carrying
drawable was shared between two different views - the NTP Fakebox and
the Omnibox. One view altering the Drawable state made the other view
instantly see these alterations, resulting in wrong positioning of
the icon.
This change aligns all StatusView icon sizes, ensuring that no icon
can ever change the intrinsic size of the TransitionDrawable.
Change intentionally kept small as it will need to be cherrypicked.
Fixed: 449181250
Change-Id: I59953971b99a01d015aa2398db058677c7816d7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7007583
Commit-Queue: Tomasz Wiszkowski <ender@google.com>
Reviewed-by: Patrick Noland <pnoland@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1525046}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/a11ac5d97f40076f5d1502084c6ef8972cff2a22
commit a11ac5d97f40076f5d1502084c6ef8972cff2a22
Author: Samuel Huang <huangs@chromium.org>
Date: Thu Oct 2 12:00:50 2025 -0700
[MVT] Fix MVT container sizing and centering on Tablets.
By "blocks" we include MVT tiles and the "Add now" button.
On Tablets, blocks and its container have special behavior:
1. Depending on **initial** block count, these render in modes:
* Centered: With "few" blocks present: The container is WRAP_CONTENT,
and "edge margins" (outer margin of outer blocks) expanded so blocks
are centered and immobile.
* Overflowed: With "many" blocks present: The container is
MATCH_PARENT, and "edge margins" are assigned a fixed value. The
blocks become scrollable.
2. When changing from "many" blocks to "few" blocks, the Overflowed
state remains. In this case, blocks no longer scroll, and are start-
aligned instead of centered.
(2) was intentional, presumably to reduce tiles "jumping" on repeated
tile removal. NewTabPageLayout (for container) and TilesLinearLayout
(for "edge margins") implemented this by doing the following:
* Store initial tile count and block count.
* Use these counts and width constants to compute "content width".
* If "content width" <= "container" size then Centered (AKA "full
filled", "all filled"); else Overflowed.
Now, MVT on tablets has some longstanding oddities
O1. When Centered, the container might not reach full width.
O2. Container may shrink on repeated tile removal (and centered) --
this is a cross between Centered (re. WRAP_CONTENT) and Overflowed
(re. fixed "edge margin") modes.
O3. When changing from "few" blocks to "many" blocks (by adding Custom
Tiles), Overflow mode does kick in sometimes, leading to blocks
appearing off-screen but cannot be scrolled to.
This CL fixes the oddities and removes behavior (2); now Centered and
Overflowed behavior depends on **current** (instead of the initial)
block count -- this fixes (O3). High level changes:
* Stop storing initial tile and block counts.
* Centralize Centered / Overflowed decision, including "content width"
computation, to MostVisitedTilesLayout.
* Change MVT child addition semantics from {Tile, non-Tile} to
{Tile, Divider, UI View (for the "Add new" button)}.
Bugs that were found and fixed:
* The duplicated Centered / Overflowed decision logic were inconsistent;
the NewTabPageLayout version (for WRAP_CONTENT / MATCH_PARENT) didn't
account for Custom Tile changes, i.e., divider & "Add new" button.
This led to (O2), and is fixed when we dedup the logic.
* When "divider gap" was changed to same as "tile gap" in
crrev.com/c/6780677 , we didn't update "content width" calculation.
This also led to (O2), and is fixed by having dividers not contribute
to "content width".
* Resources.getDimension() returns (float) PX value, and NOT DP. The
misunderstanding led to explicit conversions that made the width of
the "Add new" too large (TileRenderer.renderTileSection()). This led
to (O1). Fixing this also simplified code.
Bug: 447086773, 388782412
Change-Id: Id1400e672f1f0be11b4cc218cd20521988c3455f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7004884
Commit-Queue: Samuel Huang <huangs@chromium.org>
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1524365}
InflateException happened while inflating Buttons with style
`?android:attr/buttonBarButtonStyle`. Changed to `@style/TextButton`.
Visually looks the same as on Nightly cr140.
Chromium change: unclear
- kCollectAndroidFrameTimelineMetrics feature;
- org.chromium.base.jank_tracker.* classes
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2517b26f8677a7e51f36b3c10ed3acb61e0777b7
Cleanup Android.FrameTimeLineJank.* histograms and related code.
The histograms are not being used actively to derive any investigations.
Histogram emission was guarded behind feature flag which hasn't been
enabled in any for some time.
OBSOLETE_HISTOGRAMS: Patterned histograms
Android.FrameTimelineJank.Duration{JankScenario},
Android.FrameTimelineJank.FrameJankStatus{JankScenario},
Android.FrameTimelineJank.{Scenario}.DelayedFramesPercentage.PerScroll{Length},
Android.FrameTimelineJank.{Scenario}.MissedVsyncs{Operator}.PerScroll{Length}
haven't been emitted in more than an year.
Bug: 408388498
Change-Id: Ice1d88847eef4a8a765d4886a25aba9428961e90
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6434049
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7849fe4a5084ba98d8b3e38acac8ce86589d855b
[Bookmarks Bar] Hide the Android widget hairline when not scrolled
This CL completes the work of correcting the hairline of the toolbar to
account for bookmark bar visibility. We add a new method for
TopControlLayer's to check if they are the bottom layer in the stack by
calling the TopControlsStacker. This can be used by the Toolbar to hide
the hairline when it is not at the bottom. We call this whenever the top
controls layer height changes. We update the Android widget of the
hairline to hide when not scrolled, to match the behavior of the scene
layer, which hides its drop shadow when the bookmark bar is visible.
Bug: 394614019
Change-Id: Ib212bfb7732e4b619f4155b187d4445c05d5499b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6955916
Requres to adjust proguard flags for bytecode tests
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2747c27c571886bc1a646c4ab9eb1fa46c4b29fd
Use event-driven supplier for fulfillment type
Replace the polling-based `isUsingAiMode()` method with an event-driven
`ObservableSupplier` that reports the `NavigationFulfillmentType`.
This refactoring allows consumers like the LocationBar and Autocomplete
systems to react dynamically to changes in the fulfillment mode (e.g.,
switching between DEFAULT and AI_MODE) without needing to continuously
poll for the current state.
As a direct benefit, the LocationBar now observes this supplier to
hide the Lens button when the fulfillment type is AI_MODE, ensuring
the UI accurately reflects the available actions.
Bug: 436888404
Change-Id: Iae4df3f4fc6f5d2e298765a823b3ad61aa9f1512
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6943716
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2747c27c571886bc1a646c4ab9eb1fa46c4b29fd
Use event-driven supplier for fulfillment type
Replace the polling-based `isUsingAiMode()` method with an event-driven
`ObservableSupplier` that reports the `NavigationFulfillmentType`.
This refactoring allows consumers like the LocationBar and Autocomplete
systems to react dynamically to changes in the fulfillment mode (e.g.,
switching between DEFAULT and AI_MODE) without needing to continuously
poll for the current state.
As a direct benefit, the LocationBar now observes this supplier to
hide the Lens button when the fulfillment type is AI_MODE, ensuring
the UI accurately reflects the available actions.
Bug: 436888404
Change-Id: Iae4df3f4fc6f5d2e298765a823b3ad61aa9f1512
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6943716
Currently we have a failure on aab builds:
Service BookmarkWidgetService should be declared in the base manifest.
That commit moves it to base module and renames to
QuickActionSearchAndBookmarkWidgetService.
Resolves: https://github.com/brave/brave-browser/issues/49959
We now fallback to confirmations by default in campaigns.json for all
campaigns. The kShouldSupportNewTabPageAdConfirmationsForNonRewards
feature param is no longer needed and should be removed.
[Android] Makes a scroll in quick action search widget
There are still cases that row with tiles is cut or not displayed when
there is space for them. We better show all fav tiles when the widget
is not in a minimum height and use scroll there.
Resolves: https://github.com/brave/brave-browser/issues/49890
Fixes an issues where the picture-in-picture icon was disappearing on tablets (and tablets only) when scrolling the page content.
This PR introduces also a content description string that was missing.
* [Android] Update header image for quick shortcuts and optimization
Optimizations done:
- Initialize leo and wallet controllers regardless if feature enabled or not. This is because at this point native is not guaranteed to be initialized to check the feature. Check for option visibility is done in `BraveRadioButtonGroupAdaptiveToolbarPreference` instead.
- Override `buildUiStateForStats` to avoid asserts on Brave specific options.
* Fix for tests
* Fix for JUnit tests
This change has been produced using a Ruby script that implements the
following logic:
1. For each <color> tag in the destination, try to find one in the
source with the same name
2. If found, update the destination tag with the colour from the source
tag
3. If not found, do nothing and move onto the next tag.
4. Tags that exist in the source but not the destination are ignored.
Currently, some tags exist in the destination XML that are missing from
the source and also vice versa.
Once this has been resolved, we should be able to delete the files in
this diff and move to simply copying the generated XML files straight
out of brave/leo.
Additionally, a small change has been made to the Brave Sync "Add New
Device" button to use a Nala-defined colour rather than being hard-coded
to white.
Closesbrave/brave-browser#49143
* [Android] Remaining Brave options for quick shortcut settings
* Fox for component build
* Clean up unused profile references
* Remove Brave News option for now
* Fix for browser tests