Commit Graph
4939 Commits
Author SHA1 Message Date
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
Serg d1c604c508 Android fresh ntp after idle (#32132)
[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
2025-10-31 09:35:04 -04:00
AlexeyBarabash 58af432064 Android home settings radio (#32107)
* [Android] Any home custom url with bookmarks treated as Mobile bookmarks

Resolves https://github.com/brave/brave-browser/issues/50499
2025-10-30 16:25:43 +02:00
Oliver cd655bf8ec [Android] Apply tinting for Import/Export password manager icons (#32099)
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.

Resolves brave/brave-browser#50232
2025-10-29 22:06:48 +00:00
AlexeyBarabash d448fde427 [Android] Fixed issue with passwords search (#32030)
* [Android] Fixed issue with passwords search

Resolves https://github.com/brave/brave-browser/issues/50367
2025-10-29 18:10:00 +02: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
Serg d04fd96056 [CodeHealth] Applies NullMarked to InAppPurchaseWrapper.java. (#31982)
Resolves: https://github.com/brave/brave-browser/issues/49649
2025-10-22 23:08:50 +01:00
Oliver 3c4e0f125d [Android] Fix VPN city selection UI to reflect an option choice (#31976)
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.

Resolves brave/brave-browser#50159
2025-10-22 22:05:21 +01:00
Oliver c3008f29ce [Android] Attempt to fix cut-off background image after app restart (#31704)
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.
2025-10-22 20:28:22 +01:00
Serg ba3e1d8232 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
2025-10-21 20:53:59 +01:00
Simone Arpe 3f5f5af0ea (Wallet) Fix DApp activity flags and optimize container view (#31918)
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.
2025-10-21 12:30:09 +01:00
StephenHeaps c6f36c7708 [iOS][Android] Remove cookie consent helper toggle (#31757)
* Remove cookie consent helper toggle from iOS.

* Remove cookie consent helper toggle from Android.
2025-10-17 19:25:50 +01:00
Simone Arpe a50ba7b8e4 (Wallet) Remove SignMessagePagerAdapter (#31856)
Simplifies the wallet sign message UI by consolidating DAppsMessageFragment and SignMessagePagerAdapter into SignMessageFragment removing unnecessary abstraction layers.
2025-10-17 13:08:57 +02:00
samartnik 9e3f1bb0ac [Android] Hide rewards button when url bar gets small (#31861)
Here we follow the logic from the upstream, where they hide toolbar buttons in the same scenario.
2025-10-16 16:17:30 -04:00
Artem Samoilenko 01faa34916 [cr143][Android] Changes for StatusIcons size constraint
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}
2025-10-15 20:31:36 -04:00
Artem Samoilenko e6a41c731b [cr143][Android] Changes for MVT container sizing and centering on Tablets
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}
2025-10-15 20:31:33 -04:00
AlexeyBarabash 641cd65312 [cr142][Android] Moved KeyboardUtils class
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d0c1d036e0326d7ed30a8b3fd3e3c11d5e445759

	Revert "Reland "[Android] Close soft keyboard when test finishes while still showing it""

	This reverts commit 89195c9d05e56a978db6f8ffe54b2d3327e661fd.

	Reason for revert:
	LUCI Bisection has identified this change as the cause of a test failure. See the analysis: https://ci.chromium.org/ui/p/chromium/bisection/test-analysis/b/5644827212382208

	Sample build with failed test: https://ci.chromium.org/b/8702632694123120609
	Affected test(s):
	[ninja://chrome/android:chrome_public_test_apk/org.chromium.chrome.browser.multiwindow.InstanceSwitcherCoordinatorTest#testRenameWindow](https://ci.chromium.org/ui/test/chromium/ninja:%2F%2Fchrome%2Fandroid:chrome_public_test_apk%2Forg.chromium.chrome.browser.multiwindow.InstanceSwitcherCoordinatorTest%23testRenameWindow?q=VHash%3Af67ef36e64ab0937)

	If this is a false positive, please report it at http://b.corp.google.com/createIssue?component=1199205&description=Analysis%3A+https%3A%2F%2Fci.chromium.org%2Fui%2Fp%2Fchromium%2Fbisection%2Ftest-analysis%2Fb%2F5644827212382208&format=PLAIN&priority=P3&title=Wrongly+blamed+https%3A%2F%2Fchromium-review.googlesource.com%2Fc%2Fchromium%2Fsrc%2F%2B%2F6990831&type=BUG

	Original change's description:
	> Reland "[Android] Close soft keyboard when test finishes while still showing it"
	>
	> Fixed reland of:
	> https://chromium-review.googlesource.com/c/chromium/src/+/6978789
	>
	> Fix: Remove BaseActivityTestRule and KeyboardUtils from cronet builds
	> https://chromium-review.googlesource.com/c/chromium/src/+/6990831/2..6
	>
	> This fixes issues with batched tests failing due to the soft keyboard
	> covering UI after a previous test left it open.
	>
	> Cq-Include-Trybots: luci.chromium.try:android-cronet-arm-dbg
	> Bypass-Check-License: Moving files
	> Bug: 446713988
	> Change-Id: I5d382cff8c5808a1146fbf4b07d8681b50a9a90f
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6990831
	> Owners-Override: Henrique Nakashima <hnakashima@chromium.org>
	> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
	> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1521530}
	>

	Bug: 446713988
	No-Presubmit: true
	No-Tree-Checks: true
	No-Try: true
	Change-Id: Id16bee2f58e7f79c37d49ed9fa7e8f12dce74452
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6992391
2025-10-15 20:31:28 -04:00
AlexeyBarabash 183768d163 [cr142][Android] Moved KeyboardUtils to org.chromium.base.ui
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/89195c9d05e56a978db6f8ffe54b2d3327e661fd

	Reland "[Android] Close soft keyboard when test finishes while still showing it"

	Fixed reland of:
	https://chromium-review.googlesource.com/c/chromium/src/+/6978789

	Fix: Remove BaseActivityTestRule and KeyboardUtils from cronet builds
	https://chromium-review.googlesource.com/c/chromium/src/+/6990831/2..6

	This fixes issues with batched tests failing due to the soft keyboard
	covering UI after a previous test left it open.

	Cq-Include-Trybots: luci.chromium.try:android-cronet-arm-dbg
	Bypass-Check-License: Moving files
	Bug: 446713988
	Change-Id: I5d382cff8c5808a1146fbf4b07d8681b50a9a90f
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6990831
2025-10-15 20:31:25 -04: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 6803b08075 [cr142][Android] Changed RadioButtonGroupHomepagePreference inheritance
Now it inherits from ContainedRadioButtonGroupPreference

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

	[Settings containment] Apply containment to all radio buttons

	Refactor several radio button group preferences to use the new
	`ContainedRadioButtonGroupPreference` base class. This standardizes the
	implementation of radio button group preferences, reducing code
	duplication.

	The new base class removes the outer container's background, allowing
	the individual radio buttons to be styled directly.

	Address bar: https://screenshot.googleplex.com/6SNakREKsjgMvFj.png
	Preload page: https://screenshot.googleplex.com/6yVGFQ3ccWBUu3j.png Safe
	Browsing: https://screenshot.googleplex.com/7GadBndKtw8Dbr7.png Toolbar
	shortcut: https://screenshot.googleplex.com/9Z42rqKxV4pnasx.png

	Bug: 433576895, 439725777
	Change-Id: Ibb8d0c3961055e7dfe0c567369129cedc612f59c
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6968649
2025-10-15 20:31:12 -04:00
AlexeyBarabash 3515e637c3 [cr142][Android] New arg backPressManager
at BookmarkManagerCoordinator.ctor and
BookmarkPage.ctor

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2ce9a9e150bac037f2cef21192e9bcfa06835c38

	[Esc Secondary Activities] Support esc handling for native page bookmark

	This change enables escape handling for bookmark pages on tablets. Since
	backpress handling wasn't support for native pages, this also extends it
	to native page bookmarks. However, the main focus and goal of this
	change is to enable escape handling and for bookmarks it only clears the
	search bar. Backpress handling isn't fully scoped for this page, so if
	something is missing, please bring it to my attention and we can add a
	ticket for it to make sure backpress is fully handled. For example, I
	see that #onBackPressed for SelectableListLayout excludes large screens
	with keyboards:
	https://source.chromium.org/chromium/chromium/src/+/main:components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableListLayout.java;l=558-577;drc=48d6f7175422b2c969c14258f9f8d5b196c28d18

	Bug: 398061359
	Change-Id: Idd984fdc5e84c5122fa0d88d816ffe26ec870268
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6931457
2025-10-15 20:31:11 -04:00
AlexeyBarabash 3a48e8e488 [cr142][Android] Fixed tab Shields menu
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
2025-10-15 20:31:07 -04:00
AlexeyBarabash 621e6c2a44 [cr142][Android] New arg useIncognitoNtpIcon at DefaultFaviconHelper.setBitmapOnImageView
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/85b8667393b9bdaf34c9de38fc9c7e01b2cd8d40

	Update Incognito NTP tab strip favicon

	Changes the favicon from the Chrome logo to the Incognito symbol. This
	change is part of a larger effort to create "Desktop-like Incognito
	Windows on Clank".

	https://screenshot.googleplex.com/B4JFPfz6dHyPWEu

	Bug: 435491610
	Change-Id: Icc952428c9cb03194c19209bfd868eb65dc7d3f9
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6937054
2025-10-15 20:31:06 -04:00
AlexeyBarabash 8c886793f3 [cr142][Android] Obsolete jank_tracker stuff was removed
- 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
2025-10-15 20:31:06 -04:00
AlexeyBarabash 80da07228c [cr142][Android] Nullable profileSupplier at ShareDelegateImpl.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/6dadbe30ab5558e8987a00a24d9e2eaa0fd195f4

	Roll NullAway 0.12.8 -> 0.12.10

	Change-Id: I3fbe58a54bdfc59d2723e0843cffe8d6ea9f3702
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6961695
2025-10-15 20:31:04 -04:00
AlexeyBarabash a3b2e682df [cr142][Android] New arg topControlsStacker at TopToolbarCoordinator.ctor
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
2025-10-15 20:31:04 -04:00
AlexeyBarabash cc73f0c490 [cr142][Android] AutocompleteMediator.ctor is now of package visibility level
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
2025-10-15 20:30:59 -04:00
AlexeyBarabash 8104ebdf2b [cr142][Android] New arg navigationFulfillmentTypeSupplier at LocationBarMediator.ctor
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
2025-10-15 20:30:58 -04:00
AlexeyBarabash c4ecfab207 [cr142][Android] Arg desktopWindowStateManager at StatusBarColorController.ctor changed
Now it is not OneshotSupplier.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/81af28cb0f4672ac73b2abe569bb179338e9e3ed

	Remove DesktopWindowManager supplier

	The instance is now available from RootUiCoordinator ctor.

	Bug: N/A
	Change-Id: Ie3d447f4a2d1bc67ab62b1761e3c3dfd6298ac96
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6915194
2025-10-15 18:32:08 -04:00
AlexeyBarabash 343ec3ccfa [cr142][Android] Nullable args at AutocompleteMediator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b75287ffd5022816ad40502a334537662cb9e2b8

	Reland "Add @NullMarked to chrome/android/j/s/o/c/chrome/browser/searchwidget"

	This is a reland of commit f56c17c2af53d8e7aec8d28eebffc2c6fb6bd8aa

	Original change's description:
	> Add @NullMarked to chrome/android/j/s/o/c/chrome/browser/searchwidget
	>
	> Bug: 389129271
	> Change-Id: Idafb1abb6219ecf70be21d4117651f4741565dbd
	> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6920430
	> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
	> Owners-Override: Andrew Grieve <agrieve@chromium.org>
	> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
	> Cr-Commit-Position: refs/heads/main@{#1512497}

	Bug: 389129271
	Change-Id: I80fa460ebe005e5a4003fc54bc7f9c0e5cad5a07
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6925475
2025-10-15 18:32:05 -04:00
AlexeyBarabash 47f4871b53 [cr142][Android] New arg navigationAttachmentsCoordinator at AutocompleteMediator.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/64426d20e935e7cf23ec19869cd6f4f6ec9e46bf

	Follow aim url when aimode is enabled + enter press in omnibox

	* Only one file is supported for now
	* We drop the list of uploaded files when URL focus is lost

	Bug: 436888404
	Change-Id: Ifc7c8a8a93f67d5d8a38cb82abbb79ee39ec687d
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6896651
2025-10-15 18:32:01 -04:00
Terry Mancey 99ed05b5b8 [ads] Convert bool to enum and rename related variables (#31787)
Replace P3A boolean flag with an enum (Confirmation/P3A)
for clarity and rename related variables to match.
2025-10-14 11:41:06 -05:00
Simone Arpe c34a9106c9 (Wallet) Don't pre-select crypto accounts in Connect Wallet dialog (#31804)
Do not pre-select crypto accounts in Connect Wallet dialog
2025-10-14 17:38:14 +01:00
Simone Arpe 920c627b53 (Wallet) Serialize ActivityType enum (#31803)
Because `enum`s are a fixed set of constants (by 
Java design), we don't need to implement Parcel 
boilerplate. Serialization is the optimal solution.
2025-10-14 16:36:53 +01:00
samartnik 1e3813fbf8 [Android][Large Screen] Fix for crash on wallet onboading fragment re… (#31733)
[Android][Large Screen] Fix for crash on wallet onboading fragment recreation
2025-10-09 15:42:51 -04:00
AlexeyBarabash 9a0ce523c0 [Android][Codehealth] Backport PasswordSettingsSearchTest (#31634)
* [Android][Codehealth] Backport PasswordSettingsSearchTest
Resolves: https://github.com/brave/brave-browser/issues/49683

* [Android] Fixed password search
Resolves: https://github.com/brave/brave-browser/issues/49778
2025-10-07 23:38:35 +01:00
Serg 81afec5ffb [Android] Top sites text needs to have bottom padding (#31680)
Adds bottom padding for top sites text on NTP.
Resolves: https://github.com/brave/brave-browser/issues/49500
2025-10-07 23:09:49 +01:00
Serg 57fe679fe2 [Android] Move BookmarkWidgetService to base module (#31675)
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
2025-10-07 17:54:57 +01:00
Terry Mancey ecb867fbf2 [ads] Remove kShouldSupportNewTabPageAdConfirmationsForNonRewards feature param (#31665)
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.
2025-10-06 22:18:34 +01:00
Serg 7f640b4f67 Android widget scroll (#31635)
[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
2025-10-06 18:37:21 +01:00
Simone Arpe d9f850a5cd Fix Pip icon disappearing on tablets when scrolling (#31588)
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.
2025-10-06 15:42:19 +02:00
samartnik 851cdf1f34 [CodeHealth] Separate Brave-specific resources from Chromium overrides (#31571)
[Android] Separate Brave-specific resources from Chromium overrides
2025-10-02 08:50:51 -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
cdesouza-chromium daef249ec0 [CodeHealth] Replace ternary ops with logical expressions (#31558)
This PR is part of a couple of changes correcting these redundant
ternary operations:

```
x ? y : false -> x && y
x ? false : y -> !x && y
x ? y : true - > !x || y
x ? true : y -> x || y
```

This PR mirrors upstream work being done in the same direction:
https://issues.chromium.org/issues/416294715

Bug: https://github.com/brave/brave-browser/issues/49819
2025-10-01 21:17:34 +01:00
samartnik bd57c6c37b [Android] Update header image for quick shortcuts and optimization (#31528)
* [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
2025-10-01 09:35:18 -04:00
Oliver 0bf55f3da0 [Android] Update light/dark colours from Nala XML definitions (#31329)
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.

Closes brave/brave-browser#49143
2025-09-30 23:34:24 +02:00
samartnik 1960ddea24 [Android] Fix for hairline height for scroll events (#31512) 2025-09-30 11:53:49 -04:00
samartnik ca0b76c2bc [Android] Remaining Brave options for quick shortcut settings (#31441)
* [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
2025-09-29 17:42:26 -04:00
Brian Johnson 1f27a328c6 [Speedreader] Remove speedreader on android (#31418)
Remove buggy speedreader implementation on android
2025-09-29 11:52:46 +09:00