Commit Graph
5370 Commits
Author SHA1 Message Date
Serg 3c40cb1d47 [Android][Origin] Reclaim toolbar space when the rewards icon is hidden on tablet (#36975)
On tablet the rewards (BAT) icon lives in the brave_toolbar row, a
wrap_content LinearLayout that caches its measured width. When the icon
is hidden from onMeasure (e.g. when Brave Origin disables rewards), the
implicit requestLayout() from setVisibility() is dropped because the
toolbar is already mid-layout, so the row keeps its old width and the
weighted location bar never reclaims the freed space, leaving a gap
until a device rotation forces a fresh layout.

Route all rewards-slot visibility changes through a helper that, on an
actual change on tablet, re-requests layout on the rewards view itself
(so its row re-measures) off the measure pass, and refreshes the cached
tablet toolbar snapshot.

Resolves: https://github.com/brave/brave-browser/issues/56036
2026-06-03 19:15:36 -04:00
Szilard Szaloki 57c978e8ae Account: parameterize verification email resend/cancel by intent (#36891) 2026-06-02 21:04:00 -06:00
samartnik f27ee01fce [Android] Redesign VPN profile activity (#36930)
* [Android] Redesign VPN profile activity

* [Review] Fix for close button tint on Brave News card
2026-06-02 20:08:26 +02:00
Oliver 358a9a1107 Sites and shields redux (#34451)
The following content consists of the original commits. Original HEAD
commit is b599de1bcf0702ca11466a3ae1afeac732839544

* shields: add unified panel UI resources and skeleton handler

Add the new unified Shields panel that replaces the legacy popup,
triggered from the existing toolbar Shields icon.

- BraveUnifiedPanelHandler.java (new): skeleton handler with
  popup display, basic shields status rendering, favicon display,
  and lifecycle management.
- BraveShieldsHandler.java:
  - Add mBlockedUrls tracking to BlockersInfo.
  - Add getTotalBlockedCount() and getBlockedUrls() accessors for
    the unified panel.
- BraveShieldsContentSettings.java:
  - Add resetSiteToDefaults() to reset all per-site shields
    settings to global defaults via individual JNI getter/setter
    pairs.
- BraveToolbarLayoutImpl.java:
  - Instantiate BraveUnifiedPanelHandler and route Shields button
    taps through it instead of the legacy handler.
- All XML drawables, layouts, string resources, colors, styles,
  and BUILD.gn/brave_java_sources.gni wiring.

* shields: implement advanced options and toggle controls

Wire up the expandable advanced options section and all toggle
controls in the unified Shields panel.

- BraveUnifiedPanelHandler.java:
  - Implement shields on/off toggle with observer notification.
  - Add block scripts and fingerprinting toggles with
    BraveShieldsContentSettings persistence.
  - Add advanced options expand/collapse with navigation items.
  - Add reset site shields to defaults.
  - Stub methods for sub-panel navigation.
- BraveToolbarLayoutImpl.java:
  - Extract BraveShieldsMenuObserver into a shared instance and
    register it on both the legacy and unified panel handlers so
    either can trigger toolbar icon updates and page reloads.

* shields: add sub-panel navigation for detailed settings

Implement the drill-down sub-panels accessible from the advanced
options section of the unified Shields panel.

- BraveUnifiedPanelHandler.java:
  - Fill out stub navigation methods with full implementations.
  - HTTPS upgrades panel with strict/standard/disabled radio
    options.
  - Trackers & ads panel with aggressive/standard/allow settings.
  - Cookies panel with block-all/block-third-party/allow settings.
  - Shred site data panel with auto-shred mode selection dialog
    and immediate shred with confirmation.
  - Each sub-panel persists its selection via
    BraveShieldsContentSettings and provides return navigation
    to the main panel.

* shields: display favicons for blocked trackers and ads

Add favicon display for blocked tracker domains in the unified
Shields panel, showing up to three cascaded icons with a
prohibited overlay.

- BraveUnifiedPanelHandler.java:
  - Add asynchronous favicon lookup via
    FaviconHelper.getLocalFaviconImageForURL with a multi-step
    fallback chain: exact origin -> registrable domain (via
    UrlUtilities.getDomainAndRegistry) -> alternative TLDs.
  - Prioritize successfully loaded favicons before
    letter-placeholder defaults.
  - Render circular icon containers with theme-aware backgrounds,
    negative-margin cascading, z-ordering, and a stroke-based
    prohibited overlay.
  - Use UrlFormatter for display-friendly domain names.
  - Use ViewUtils.dpToPx for density-independent measurements.

* shields: implement broken site reporting panel

Wire up the broken site reporting panel in the unified Shields UI,
accessible when shields are toggled off.

- BraveUnifiedPanelHandler.java:
  - Add showReportBrokenSitePanel() and
    setupReportBrokenSitePanel().
  - Display site favicon and domain via UrlFormatter.
  - Populate category selection from WebcompatReporterHandler.
  - Attach screenshot via BraveShieldsScreenshotUtil.
  - Pre-populate contact info from existing reporter preferences.
  - Add learn-more clickable span linking to community support.
  - Submit report via WebcompatReporterHandler with toast
    confirmation.

* shields: Add tests for suitable bits of the implementation.

Add unit tests for the new unified Shields panel logic introduced
across the preceding commits.

- BraveShieldsContentSettingsResetTest.java:
  - Verify resetSiteToDefaults() reads global defaults and applies
    them to a per-site URL for all eight setting types.
  - Verify HTTPS upgrade setter is skipped when global default is
    "default" and called when it is any other value.
- BraveUnifiedPanelHandlerStatTest.java:
  - Verify addStat() increments the correct counter for each block
    type (ads, trackers, scripts, fingerprinting).
  - Verify blocked URL recording with 50-item cap.
  - Verify clearBraveShieldsCount() resets and removeStat() deletes
    tab entries.
  - Verify getters return sensible defaults for unknown tab IDs.
  - Verify per-tab stat isolation.
- BraveUnifiedPanelFaviconPriorityTest.java:
  - Verify populateBlockedItemsContainer() prioritises successfully
    loaded favicons before letter-placeholder defaults.
  - Verify display is capped at MAX_BLOCKED_ICONS (3).
  - Verify onFaviconResult() countdown triggers population only
    after all loads complete.
  - Verify cascading negative-margin layout for overlapping icons.
- BUILD.gn (brave/android/junit, brave/test):
  - Register new robolectric_library targets for the shields and
    preferences.website test packages.

* Cleanup & Remove old Shields UI.

This commit completes the changeset by removing the old Shields UI from
the codebase.

Since only a small amount of functionality needed to be kept from the
old UI's code, it has been relocated into BraveUnifiedPanelHandler

* Apply Shields UI tweaks.

This commit applies a number of minor tweaks that were initially missed
from the Figma designs. This should make the look and feel match with
the intended UX fully.

* Shields: Task-post & Back button cleanup.

The back button has been moved to its own XML which is then included by
other dialogs. Additionally, the Shred UI has been fixed up to be
consistent with the existing dialogs.

The favicon rendering task uses PostTask now. The check for whether or
not to post the task has been removed since the callback checks it
anyway and the saving from not posting the task would require pretty
tight timing in order to actually be of benefit so it's arguably not
worth double-checking.

* Shields: Improve accessibility for toggle switches.

Since we have custom-designed toggles, TalkBack would consider them
images. We now attach a delegate to these controls that causes them to
be treated as switches.

* Shields: Improve title sizing, HTTPS reset & fix radio buttons

The title sizing now uses a standard Material style for titles along
with a few tweaks that make it dynamically downsize itself to avoid
truncation.

The HTTPS settings reset is now called unconditionally in order to
resolve a report from the puLL-Merge bot.

Finally, Since there appears to be no easy way to group the radio
buttons whilst retaining the desired style, the code now unconditionally
unchecks them after a settings reset to ensure multiple entries don't
appear to be selected.

* Shields: Remove tryAlternativeTldFavicon code.

We originally implemented a hack for verifying if favicons would load at
all. It has served its purpose and we of course can't legitimately
attempt to pull favicons for other TLDs since they could just be
flat-out wrong. There may be desire for a mechanism in future where we
alias domains, but that is largely out-of-scope for our UI.

* Shields: Support zooming/scrolling the screenshot preview.

When a user reports a site and previews the screenshot (if they choose
to send one) they can now zoom and scroll around the image.

This commit includes the implementation of a reusable class for handling
inputs and scaling the image. I didn't find any pre-existing code for
this behaviour and whilst it could be used elsewhere, I've left it
embedded as a static class since there are no other potential users at
this juncture.

* Shields: Restore code that handles WebView usage.

The old implementation of the Shields panel would ensure
`mHardwareButtonMenuAnchor`/`mContext` were initialised when in WebView
only mode. We still require this in order for the panel to still work.

* Implement more requested minor UI tweaks.

This adds animations to the toggle buttons in the new Shields UI and
fixes the ripple animation on the advanced expander which was missing a
single XML attribute that clamped the effect to the bounds of the
rounded box.

The blocked trackers (without a favicon) have also been tweaked to use
colours from Nala and the letter has been sized up to match the Figma
design.

* Switch toggles to Material UI

This commit switches the toggles to Material UI. This doesn't appear to
have any discernible issues but I'm keeping it separated just in case.

* Support Material You colours and tweak minor UI issues.

This commit alters the XML files so that Material You themes should work
out of the box once the Brave flag for dynamic colours is enabled.

Also resolves a few minor UI issues with placing/alignment/sizing.
2026-06-02 16:43:45 +02:00
AlexeyBarabash e506969ee9 [Android] Fix settings containment on foldable fold/unfold (#36924)
Fold/unfold fires onConfigurationChanged without recreating the
activity, leaving containment styling stale. Override
onConfigurationChanged in BraveMainPreferencesBase to post
notifyPreferencesUpdated after the layout pass.

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

AI-assisted commit
2026-06-02 17:38:29 +03:00
Serg 065cd82a2d [Android] Show restart prompt on credential-refresh Origin purchase (#36904)
When an Origin purchase is first detected via credential refresh (e.g.
linked from account.brave.com), open the Origin settings screen and show
the existing restart snackbar.

The shared first-purchase trigger in BraveOriginService::OnCredentialSummary
calls the navigation delegate, whose Android branch was previously a no-op.
It now routes through a JNI helper that opens BraveOriginPreferences with an
explicit show-restart flag, where onViewCreated shows the restart snackbar.

Play Store purchases are left to the existing Java subscription flow (which
shows the "Disabling features" spinner while credentials are fetched, then
transitions to the restart prompt). The helper skips opening when a Play
Store purchase token is present so the screen isn't opened twice.

Resolves: https://github.com/brave/brave-browser/issues/55991
2026-06-02 02:46:34 +02:00
r0hit0303 e531b918b6 [android] Show brave specific delete browsing data from site settings (#36887)
This change updates the Site Settings > All Sites > Delete browsing data... to open the brave's Delete browsing data dialog instead of the upstream.

Resolves: https://github.com/brave/brave-browser/issues/55970
2026-06-01 23:03:39 +02:00
samartnik 4c8878f1b2 [Android] Fix for settings containment after VPN banner remove (#36878) 2026-06-01 16:36:16 +02:00
Serg 89a6bd6f7b [Android] Surface Play in-app messages for subscription events (#36819)
Calls BillingClient.showInAppMessages on app foreground so the Play
Store can render its recovery dialog (declined payment, opt-in price
change) on top of Brave. Gated on the user having an active VPN or Leo
subscription, throttled to one call per real foreground session via an
ApplicationStatus listener that resets only on HAS_STOPPED_ACTIVITIES /
HAS_DESTROYED_ACTIVITIES — in-app navigation does not re-trigger.

Resolves: https://github.com/brave/brave-browser/issues/55735
2026-05-28 17:48:12 -04:00
samartnik 9c94331634 [Android] Respect Show search suggestions in search widget (#36781)
* [Android] Respect `Show search suggestions` in search widget

* [Review] Use BravePref for the preference

* [Review] Change default value when profile is not ready
2026-05-28 17:49:13 +01:00
AlexeyBarabash fba7852b51 [Android][Sync] Reading list option (#36761)
* [cr149][Android][Sync] Show Reading list type at UI

Resolves https://github.com/brave/brave-browser/issues/55850
2026-05-27 21:35:05 +03:00
Simone Arpe 8a815b13e3 Show correct amount to send and correct gas fee on confirmation screen (#36753) 2026-05-27 18:12:46 +02:00
samartnik c834e2aa5e [Android] Fixes for menu items on tablets (#36756) 2026-05-27 16:05:25 +01:00
Aleksei Serenand 880010d8e8 [ads] Fix crash on Android when opening a dynamic NTT (#36722)
The PR fixes crash on Android when opening a new tab with dynamic NTT
after the Chromium 149 bump, caused by passing null as attach params.

Co-Authored-By: serg@brave.com
2026-05-26 19:24:14 +01:00
samartnik ab4a8d0662 [Android] Fix for the landscape view for VPN paywall activity (#36730) 2026-05-26 19:16:02 +01:00
samartnik 383679f3d6 [Android] Additional fixes for Nala icons (#36719)
* [Android] Additional fixes for Nala icons

* [Review] UI changes for VPN paywall

* Fixes on rebase to master
2026-05-26 18:24:17 +01:00
Simone Arpe 6f043d9866 Show warning message for all EIP-712 transactions (#36716) 2026-05-26 19:13:02 +02:00
Anton Paymyshev d18b0cc77b [Wallet] Remove wallet p3a mojo (#36658) 2026-05-26 21:54:13 +07:00
Simone Arpe 983952ca09 Fix search query concatenation with + symbols instead of spaces (#36691) 2026-05-26 14:24:41 +02:00
Aleksei Seren 44c44a5426 Remove Brave News promoted content ads dead code on Android (#36635)
The Brave News inline promoted ads pipeline is already disabled via
https://github.com/brave/brave-core/pull/32359. This PR removes the remaining
promoted content ads Android code and mojom code that no longer has any effect.
2026-05-25 12:22:01 -05:00
Anton Lazarev 0809524171 Migrate per-profile social media blocking settings (#36263)
* add migration for social media blocking prefs

* move pref change registrar to AdBlockService

* change new preference path to avoid conflict

Settings UI pages automatically check for matching preferences
registered under the profile first. They only check under local state if
nothing was found registered under the profile prefs.

This means we can't use the same preference path after the migration.

* only attempt to migrate settings from regular profiles

The first profile to initialize is the System Profile, which will never
have any meaningful settings to migrate.

* use local state in the tests

* update BraveProfilePrefsBrowserTest

* register legacy prefs as part of `AdBlockPrefService`

* add comment in normal migration path
2026-05-22 20:10:09 -07:00
Max Karolinskiy bf86fd94a9 Upgrade from Chromium 148 to Chromium 149 (#35415)
Resolves https://github.com/brave/brave-browser/issues/54357
2026-05-22 19:44:28 -04:00
Artem Samoilenko 0940bd89b3 [cr149][Android] Changes for IntentHandler url check
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/dc0cbb23186619c18fe1f99fb0640c52a92191d1

commit dc0cbb23186619c18fe1f99fb0640c52a92191d1
Author: Ryo Hashimoto <hashimoto@google.com>
Date:   Mon Apr 27 23:04:18 2026 -0700

    android: Use startup::ValidateUrl()

    To make Android Chrome consistent with Chrome on other platforms.

    - Move startup::ValidateUrl() to a separate file.
    - Modify startup::ValidateUrl() to allow content URLs.
    - Use startup::ValidateUrl() in IntentHandler.

    BUG=499123715

    Change-Id: Ibe71f406c5ea5e4393cacd497eb0f124fe4f0b84
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7728623
    Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
    Reviewed-by: Avi Drissman <avi@chromium.org>
    Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
    Reviewed-by: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1621560}
2026-05-22 16:57:41 -04:00
Artem Samoilenko 4e8d2d0b91 [cr149][Android] Changes for TabbedAdaptiveToolbarBehavior
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3ec47adc3d22fed19f51e0f239bdcdfb57fe5b86

commit 3ec47adc3d22fed19f51e0f239bdcdfb57fe5b86
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Wed May 6 16:54:16 2026 -0700

    [Glic] Fix crash on posture change

    - Expose a non-creating way to get BWI pointer in Java.
    - Add fallback if the BWI pointer is destroyed (activity is
      destroying).

    Fixed: 510017377
    Change-Id: I655ee87dc109ca7fa0126851d3365254718377e6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7823282
    Reviewed-by: Linyu He <linyuh@google.com>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Jack Thiesen <jthiesen@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1626567}
2026-05-22 16:57:40 -04:00
Artem Samoilenko da9fb06b7f [cr149][Android] Changes for making bottom controls more generic
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d0dca8d3d103b066d551f6713a3ab53b1072ee51

commit d0dca8d3d103b066d551f6713a3ab53b1072ee51
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Fri Mar 13 10:44:15 2026 -0700

    [BottomControls] Make bottom controls more generic

    * Simplify back press logic.
    * Extract LayerType so the component can be reused for multiple layers.
    * Misc. cleanup and reorganization.

    Bug: 492262214
    Change-Id: Ic35a7613f950d73470471b4b5c8b62497c535cee
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7665618
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Reviewed-by: Dan Polanco <polardz@google.com>
    Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1599163}
2026-05-22 16:57:34 -04:00
Artem Samoilenko 613195b9ff [cr149][Android] Changes for optional button on LocationBar
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/2d803238f4a71a73decc73a5ec682070f1401750

commit 2d803238f4a71a73decc73a5ec682070f1401750
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Tue Apr 28 18:00:59 2026 -0700

    [IA] Move optional button to LocationBar

    - Create an OptionalButtonCoordinator in LocationBarCoordinator for
      phones only.
    - Add logic to show/hide new optional button dynamically.
    - Update ToolbarPhone to proxy calls into LocationBar except on the
      NTP. On the NTP the identity disk is still presented in the optional
      button. Will refactor post-launch.

    Bug: 491511644
    Change-Id: I81a485c1fa93420c661984523cb0367f737d87be
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7793280
    Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1622145}
2026-05-22 16:57:29 -04:00
Artem Samoilenko ed83c58fa0 [cr149][Android] Changes for plus button on the ntp fakebox
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/b13bf0ba6e66a140136f05cb57fdc327edbde6f8

commit b13bf0ba6e66a140136f05cb57fdc327edbde6f8
Author: Brandon Wylie <wylieb@google.com>
Date:   Tue Apr 28 20:56:23 2026 -0700

    [aim] Add plus button to the ntp fakebox

    Bug: 496955673
    Change-Id: Ic9cb8cad4489a47e795155db4712131734b87ccb
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7787437
    Commit-Queue: Brandon Wylie <wylieb@google.com>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1622213}
2026-05-22 16:57:29 -04:00
Artem Samoilenko da4a404f2c [cr149][Android] Changes for favicon background in StatusView
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ea28e703517df10083777563e9bcf2b982e4f83

commit 5ea28e703517df10083777563e9bcf2b982e4f83
Author: Sky Malice <skym@chromium.org>
Date:   Fri Apr 24 12:00:41 2026 -0700

    [AIM] Show favicon in StatusView during exact match.

    Bug: 495903036
    Change-Id: Iecff15665523280814a6ffa9b1e82e9d4fefd417
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7738777
    Reviewed-by: Tomasz Wiszkowski <ender@google.com>
    Commit-Queue: Sky Malice <skym@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1620374}
2026-05-22 16:57:29 -04:00
Artem Samoilenko 2b1420fc06 [cr149][Android] Fixes for the [unchecked] warning
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/7d3c16b9bb778a09b643288fe47bae4c1d8e53b7

commit 7d3c16b9bb778a09b643288fe47bae4c1d8e53b7
Author: Jingping Sun <jings@microsoft.com>
Date:   Mon Apr 27 10:58:12 2026 -0700

    [Unchecked] Enable -Xlint:unchecked for Chromium-owned code

    Conditionally append -Xlint:unchecked to the base javac flags only when
    options.chromium_code is true. This makes javac fail the build on any
    new unchecked-conversion / heap-pollution / raw-type warnings in
    Chromium-owned Java code, while leaving synced third-party Java sources
    (chromium_code=false; auto-defaulted for third_party/ paths without
    org.chromium namespace) compiled silently as before.

    Why conditional, not global: Synced third-party Java code under
    third_party/{junit,google-truth}/ src/ contains unchecked-warning sites
    we cannot fix in chromium code base.

    Bug: 358366667
    Change-Id: I904b09cd4484098cee3b59e6d4aae94eba8d33ae
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7790536
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Peter Wen <wnwen@chromium.org>
    Commit-Queue: Jingping Sun <jings@microsoft.com>
    Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1621171}
2026-05-22 16:57:27 -04:00
Artem Samoilenko 7dd110ed3d [cr149][Android] Changes for new tab button
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/4575a451d5d953949be0aaf01bffaaa64c851a26

commit 4575a451d5d953949be0aaf01bffaaa64c851a26
Author: Dan Polanco <polardz@google.com>
Date:   Sun Apr 26 14:59:20 2026 -0700

    [BottomBar] Add new tab button

    http://go/scrcast/NjY5OTkzNTY2Njc5ODU5MnxkNTRiMDY5Yi03YQ

    Fixed: 491509796
    Change-Id: Id3a3a3e697443a85dcbaf804bdad5ead7f8e2906
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7787395
    Commit-Queue: Dan Polanco <polardz@google.com>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1620847}
2026-05-22 16:57:24 -04:00
Artem Samoilenko 48e7a587c0 [cr149][Android] Fix for status icon width
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f866d9d3f235bcae9a293dbb82867590679b8c2a

commit f866d9d3f235bcae9a293dbb82867590679b8c2a
Author: Tomasz Wiszkowski <ender@google.com>
Date:   Wed Apr 15 17:52:14 2026 -0700

    Fix StatusIcon runtime sizing and UrlBar runtime padding.

    Status icon should have a runtime size of 56dp when the url bar has
    focus. This is presently achieved by keeping status view size as
    "wrap content" and computing the "additional margin for the url bar"
    when the url bar gets focus.

    This change removes the logic computing the extra padding and ensures
    the status view has a proper size instead.

    Bumping render test revisions because text in Incognito/SearchActivity
    omnibox does not visually align with suggestions on the reference
    screenshot --example:

    Before: http://screen/3gpJKD8s5CLXxSP.png
    After: http://screen/86yBmRWEVXiMAEN.png

    Screen: https://screenshot.googleplex.com/9F5yYvygWWzUtmA.png
    Change-Id: If5730d154b6eed22a76a899e830fbe6a95084419
    Fixed: 488840224
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7759955
    Reviewed-by: Sky Malice <skym@chromium.org>
    Commit-Queue: Tomasz Wiszkowski <ender@google.com>
    Cr-Commit-Position: refs/heads/main@{#1615531}
2026-05-22 16:57:24 -04:00
samartnik fadf1cb4fa [Android] Fix for News card close button margin (#36663) 2026-05-22 21:46:53 +01:00
Artem Samoilenko 3fda3ea37a [cr149][Android] Changes for top toolbar controls visibility
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/3be4aa262c2e4e73d091abf55f1ad055b9d7eddf

commit 3be4aa262c2e4e73d091abf55f1ad055b9d7eddf
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Fri Apr 17 11:02:08 2026 -0700

    [Clank IA] Update control visibility

    Toggle visibility of tab switcher, app menu and optional button using
    toolbar variations.

    Still to be done:
    - Move optional button location
    - Update URL & StatusView location

    Bug: 497898172
    Change-Id: Ied5f17595f38be55f28210682820d8e55825046e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7762379
    Reviewed-by: Sky Malice <skym@chromium.org>
    Reviewed-by: Dan Polanco <polardz@google.com>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616699}
2026-05-22 16:25:13 -04:00
Artem Samoilenko 8af75b3a89 [cr149][Android] Changes for NTP LegacyLogoView
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c66e45550985e3570e1cf181df0ec749ab3d80f6

commit c66e45550985e3570e1cf181df0ec749ab3d80f6
Author: Yanting Yu <yyanting@google.com>
Date:   Tue Apr 21 12:43:23 2026 -0700

    [LogoRefactor] Branch to LegacyLogoView and introduce feature flag.

    This CL branches the current LogoView implementation into LegacyLogoView
    to ensure the existing functionality remains intact while we restructure
    the new LogoView in the follow up CL.

    Changes include:
    - Branched LogoView, LogoViewBinder, layout XMLs, and corresponding unit tests into LegacyLogoView equivalents.
    - Added the ChromeFeatureList.LOGO_VIEW_REFACTOR feature flag in LogoCoordinator to dynamically switch between inflating the LogoView and the LegacyLogoView.
    - Extracted the ClickHandler interface from LogoView into LogoProperties to serve as a shared, domain-specific contract. This cleanly decouples the two views, allowing them to be fully independent while still being driven by the same PropertyModel and LogoMediator.
    - Updated new_tab_page_layout.xml to replace the `logo_holder` FrameLayout with ViewStub.

    Bug: 492453183
    Change-Id: Id0ef80f8acab9c2d15928020eb3688bd9f2afc33
    Bypass-Check-License: branched files
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7760153
    Commit-Queue: Yanting Yu <yyanting@google.com>
    Reviewed-by: Xi Han <hanxi@chromium.org>
    Reviewed-by: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1618376}
2026-05-22 16:25:13 -04:00
Artem Samoilenko 1e4a1598f5 [cr149][Android] Introduce AutocompleteState
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/7dfb3a2d7ff70cef2b442a34fb4534a44be83b1d

commit 7dfb3a2d7ff70cef2b442a34fb4534a44be83b1d
Author: Tomasz Wiszkowski <ender@google.com>
Date:   Wed Apr 22 15:33:27 2026 -0700

    Introduce AutocompleteState.

    The new AutocompleteState clearly describes how Autocomplete stack
    responds to input changes. Three explicit states control whether user
    should see suggestions when they enter active input session.

    Change-Id: If889a3393b5ea73f23c5cd460d4b25b4926a29f0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7787032
    Reviewed-by: Sky Malice <skym@chromium.org>
    Commit-Queue: Tomasz Wiszkowski <ender@google.com>
    Cr-Commit-Position: refs/heads/main@{#1619142}
2026-05-22 16:25:12 -04:00
Artem Samoilenko 9a07605e07 [cr149][Android] Do not allow a parameter for @CalledByNative
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/30d45a378201de2f3257e86b62ed2d7089830404

commit 30d45a378201de2f3257e86b62ed2d7089830404
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Wed Apr 22 14:52:19 2026 -0700

    JNI Zero: Do not allow a parameter for @CalledByNative

    All uses of it have been migrated.

    Bug: 496331306
    Change-Id: Iee57709d8b55493712acaa731403dc35617a9e94
    Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7786592
    Auto-Submit: Andrew Grieve <agrieve@chromium.org>
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Martin Kong <martinkong@google.com>
    Cr-Commit-Position: refs/heads/main@{#1619108}
2026-05-22 16:25:12 -04:00
Artem Samoilenko b4dd4c5554 [cr149][Android] Remove Page Summary adaptive toolbar button
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f71a274e4251ab0af4309311f1872115cce080df

commit f71a274e4251ab0af4309311f1872115cce080df
Author: Bryan Song <bryansong@google.com>
Date:   Tue Apr 21 16:45:11 2026 -0700

    Remove Page Summary adaptive toolbar button

    There's an adaptive toolbar button that was created to test Chrome's AI
    integrations. It is no longer used. Therefore, this CL removes the
    button and associated services.

    Bug: 500481129
    Change-Id: If52a300da2af950d5303e867546ee369e1042114
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7762974
    Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
    Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
    Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
    Commit-Queue: Bryan Song <bryansong@google.com>
    Cr-Commit-Position: refs/heads/main@{#1618547}
2026-05-22 16:25:11 -04:00
Artem Samoilenko 5c644db989 [cr149][Android] Plumb LocationBarFocusScrimHandler to LocationBarMediator
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/9968c93603137808ad94865feef269431b0c6db1

commit 9968c93603137808ad94865feef269431b0c6db1
Author: Tomasz Wiszkowski <ender@google.com>
Date:   Mon Apr 20 15:03:13 2026 -0700

    Plumb LocationBarFocusScrimHandler to LocationBarMediator.

    This change should allow us to invoke Scrim when we need it.

    Bug: 485180312
    Change-Id: I0bb1f203d0e15c4948a61cedb4bb4c5e328b7d1a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7773078
    Commit-Queue: Tomasz Wiszkowski <ender@google.com>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Auto-Submit: Tomasz Wiszkowski <ender@google.com>
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1617792}
2026-05-22 16:25:11 -04:00
Artem Samoilenko 0a16a35e65 [cr149][Android] Changes for favicon getter
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ee2afaf87b258f0f692c32d17866114a996eb66

commit 5ee2afaf87b258f0f692c32d17866114a996eb66
Author: Zhe Li <zheliooo@google.com>
Date:   Mon Apr 20 13:08:32 2026 -0700

    [TabFavicon] Do not fallback to host for tab switcher and tab strip

    - Guarded behind feature flag sFaviconDisableHostFallback.
    - Sets `fallbackToHost = false` in LayerTitleCache.java and TabListFaviconProvider.java when feature is enabled.
    - Default `fallbackToHost = true` for all the other callsites.
    - Added histograms Favicons.AndroidHostFallbackFetchResult.* in favicon_helper.cc

    Bug: 468979189
    Change-Id: I5574adf85647c1d5205889dddc2bc42bfba35305
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7745223
    Reviewed-by: Theresa Wellington <twellington@chromium.org>
    Commit-Queue: Zhe Li <zheliooo@google.com>
    Auto-Submit: Zhe Li <zheliooo@google.com>
    Cr-Commit-Position: refs/heads/main@{#1617726}
2026-05-22 16:25:11 -04:00
Artem Samoilenko 9a7833bd45 [cr149][WIP][Android] Sync code in removed from ManageSyncSettings
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/008e21eee2ca1b4d967a68367121423f6e411e2b

commit 008e21eee2ca1b4d967a68367121423f6e411e2b
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Mon Apr 20 04:59:40 2026 -0700

    [sync/android] Remove sync-the-feature code in ManageSyncSettings

    kForceMigrateSyncingUserToSignedIn was enabled by default on Android
    in M148.

    OBSOLETE_HISTOGRAMS=The sync error card was removed, along with its histograms.

    Bug: 40066949
    Change-Id: I8317957d3ad7cdeecaac415a11a2974af90d65d4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7772912
    Reviewed-by: Ankush Singh <ankushkush@google.com>
    Reviewed-by: Marc Treib <treib@chromium.org>
    Commit-Queue: Victor Vianna <victorvianna@google.com>
    Auto-Submit: Victor Vianna <victorvianna@google.com>
    Cr-Commit-Position: refs/heads/main@{#1617409}
2026-05-22 16:25:08 -04:00
Artem Samoilenko b42e1d7584 [cr149][Android] Fixes for AlreadyChecked nullaway warning 2026-05-22 16:25:08 -04:00
Artem Samoilenko 1936424dcb [cr149][Android] Changes for ThinWebViewFactory
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/0e9f87c1f965e3a4ec98bb5334ca4d70d95c62df

commit 0e9f87c1f965e3a4ec98bb5334ca4d70d95c62df
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Fri Apr 17 08:07:47 2026 -0700

    [TabBottomSheet] Add permissions support

    Bug: 491498632
    Change-Id: I44e91ce4ac8ef0bbc413503dd73123caba8cbbc5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7763465
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Theresa Wellington <twellington@chromium.org>
    Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616570}
2026-05-22 16:25:08 -04:00
Artem Samoilenko 6c0af000b6 [cr149][Android] Changes for locking the toolbar when actuating
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/6e0e9337f49ea19d9e9246160c199089d3f21892

commit 6e0e9337f49ea19d9e9246160c199089d3f21892
Author: Hailey Wang <haileywang@google.com>
Date:   Mon Apr 20 12:27:25 2026 -0700

    [Glic] Lock the toolbar when actuating

    Bug: 501465099
    Change-Id: Ic5ad6bd5a247193c62d14f5c0ab7bc27f11022cd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7762873
    Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
    Commit-Queue: Hailey Wang <haileywang@google.com>
    Cr-Commit-Position: refs/heads/main@{#1617694}
2026-05-22 16:25:07 -04:00
Artem Samoilenko 3de1ba4f5c [cr149][Android] Nullmark Supplier<TabCreatorManager> correctly
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e08a5701d07c631663f475bb1ba331e303a6fb6c

commit e08a5701d07c631663f475bb1ba331e303a6fb6c
Author: Henrique Nakashima <hnakashima@chromium.org>
Date:   Fri Apr 17 12:02:30 2026 -0700

    [Android] Nullmark Supplier<TabCreatorManager> correctly

    This is part of adding @NullMarked to TabbedRootUiCoordinator

    Change-Id: I6ac5aa86205963624397e99b15180f06c1c7b488
    Bug: 389129271
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7766565
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1616739}
2026-05-22 16:25:07 -04:00
Artem Samoilenko 166a0147a5 [cr149][Android] Changes for TabbedAppMenuPropertiesDelegate c-tor
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/bafb125de13ea5ef6b6bf0a39398f836c834efc2

commit bafb125de13ea5ef6b6bf0a39398f836c834efc2
Author: Yanling <yanlinghu@google.com>
Date:   Mon Apr 20 11:56:14 2026 -0700

    [Feed] Part2 of remove web feed feature: Delete Web Feed small UI components and associated IPHs

    this CL cleans up various small UI components, including removing
    related In-Product Help (IPH) features and preference keys.

    1. Removed WebFeedMainMenuItem, WebFeedFollowIntroController,
    WebFeedFollowIntroView,WebFeedRecommendationFollowAcceleratorController,
    ClickableTextBubble and WebFeedSnackbarController.

    2. Removed IPH Features: Deletion reference: https://crrev.com/c/7067894
    - IPH_WebFeedFollow
      * Added in: https://crrev.com/c/2817518
    - IPH_WebFeedAwareness
      * Added in: https://crrev.com/c/3632953
    - IPH_WebFeedPostFollowDialogWithUIUpdate
      * Added in: https://crrev.com/c/4867332
    - IPH_WebFeedPostFollowDialog
      * Added in: https://crrev.com/c/4867332

    3. Removed Chrome Preference Keys:
    - WEB_FEED_INTRO_LAST_SHOWN_TIME_MS
    - WEB_FEED_INTRO_WEB_FEED_ID_SHOWN_TIME_MS_PREFIX
    - WEB_FEED_INTRO_WEB_FEED_ID_SHOWN_COUNT_PREFIX
      * Added in: https://crrev.com/c/2817518 and https://crrev.com/c/3692349
      * Deletion reference: https://crrev.com/c/7561272
      * Followed deprecation instructions from ChromePreferenceKeys.java: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java;l=36-39;drc=30c17203494464b1b107c90273c1358db359e04a

    Cq-Include-Trybots: luci.chrome.try:android-internal-binary-size;luci.chrome.try:android-internal-rel;luci.chrome.try:android-internal-dbg
    Bug: 407797637
    Change-Id: I0e3669255394f6121f5d5b4352171767d0f43fa3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7757080
    Reviewed-by: Theresa Wellington <twellington@chromium.org>
    Reviewed-by: Xi Han <hanxi@chromium.org>
    Commit-Queue: Yanling Hu <yanlinghu@google.com>
    Cr-Commit-Position: refs/heads/main@{#1617671}
2026-05-22 16:25:07 -04:00
Artem Samoilenko ed7896dca4 [cr149][Android] Changes for tab favicon feature
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/5ee2afaf87b258f0f692c32d17866114a996eb66

commit 5ee2afaf87b258f0f692c32d17866114a996eb66
Author: Zhe Li <zheliooo@google.com>
Date:   Mon Apr 20 13:08:32 2026 -0700

    [TabFavicon] Do not fallback to host for tab switcher and tab strip

    - Guarded behind feature flag sFaviconDisableHostFallback.
    - Sets `fallbackToHost = false` in LayerTitleCache.java and TabListFaviconProvider.java when feature is enabled.
    - Default `fallbackToHost = true` for all the other callsites.
    - Added histograms Favicons.AndroidHostFallbackFetchResult.* in favicon_helper.cc

    Bug: 468979189
    Change-Id: I5574adf85647c1d5205889dddc2bc42bfba35305
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7745223
    Reviewed-by: Theresa Wellington <twellington@chromium.org>
    Commit-Queue: Zhe Li <zheliooo@google.com>
    Auto-Submit: Zhe Li <zheliooo@google.com>
    Cr-Commit-Position: refs/heads/main@{#1617726}
2026-05-22 16:25:06 -04:00
Artem Samoilenko 0ec29d0b7a [cr149][Android] Changes for partner bookmarks override
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/da43416448f4755db99108cd2361f328d3090f0e

commit da43416448f4755db99108cd2361f328d3090f0e
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Wed Apr 15 08:31:29 2026 -0700

    Android: Roll NullAway 0.13.1 -> 0.13.3

    Bug: 502166094
    Change-Id: I6af3871c9cf3b529c654e466b2167282279e9537
    Cq-Include-Trybots: luci.chrome.try:android-internal-dbg,android-internal-binary-size
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7762582
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
    Auto-Submit: Andrew Grieve <agrieve@chromium.org>
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1615193}
2026-05-22 16:25:00 -04:00
Artem Samoilenko 6096b5e237 [cr149][Android] Refactor baseButtonDataProvider to user button spec builder
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/cd92b2ad88f24a127a8bc1aa36f7eb6efbcf7b3b

commit cd92b2ad88f24a127a8bc1aa36f7eb6efbcf7b3b
Author: Hailey Wang <haileywang@google.com>
Date:   Tue Apr 14 19:02:01 2026 -0700

    [Glic] Refactor baseButtonDataProvider to user button spec builder

    Bug: 485624827
    Change-Id: Ib0812fd83c81b13f1b1f246139bb38beb0194e1a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7667476
    Reviewed-by: Siddhartha S <ssid@chromium.org>
    Reviewed-by: Salvador Guerrero Ramos <salg@google.com>
    Commit-Queue: Hailey Wang <haileywang@google.com>
    Cr-Commit-Position: refs/heads/main@{#1614895}
2026-05-22 16:25:00 -04:00
Artem Samoilenko b40d81b10a [cr149][Android] Changes for isPanelShowingForBrowser check to toolbar button
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/987491a33cac6fd9e68a3fe310fa3731bb9deb87

commit 987491a33cac6fd9e68a3fe310fa3731bb9deb87
Author: Hailey Wang <haileywang@google.com>
Date:   Mon Apr 13 19:38:50 2026 -0700

    [Glic] Add isPanelShowingForBrowser check to toolbar button

    Tracks the panel open state via GlobalShowHideObserver and
    isPanelShowingForBrowser.

    Did a small readability refactor for updateButtonState.

    Bug: 485624827
    Change-Id: Ic986e11bff70bdc52653518d309f79059828d2f5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7728992
    Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
    Commit-Queue: Hailey Wang <haileywang@google.com>
    Cr-Commit-Position: refs/heads/main@{#1614158}
2026-05-22 16:24:58 -04:00
Artem Samoilenko aad5b0bfa2 [cr149][Android] Changes for TabbedAdaptiveToolbarBehavior
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/bf83a63ce609a05fa1cbd9ad85b37920c3aa9e8d

commit bf83a63ce609a05fa1cbd9ad85b37920c3aa9e8d
Author: Hailey Wang <haileywang@google.com>
Date:   Mon Apr 13 15:16:05 2026 -0700

    [Glic] Make toggleGlic callback accept a boolean

    Bug: 498721993
    Change-Id: Ide0b83be60599c4ffa7c1b1e18d2340d2e6feab1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7747038
    Commit-Queue: Hailey Wang <haileywang@google.com>
    Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1614006}
2026-05-22 16:24:55 -04:00