85 Commits
Author SHA1 Message Date
Aleksei Seren 93614c2607 [ads] Fix no gap between NTT CTA button and Brave News feed on Android (#36940)
The PR adds 10dp margin to the NTT CTA button on Android
creating the required gap between the NTT CTA button and the
Brave News feed.

Resolves https://github.com/brave/brave-browser/issues/37465
2026-06-04 21:20:32 +02: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
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
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
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 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
samartnik fadf1cb4fa [Android] Fix for News card close button margin (#36663) 2026-05-22 21:46:53 +01:00
Artem Samoilenko ee0bf49c3c [cr149][Android] NTP vertical gaps for MVT
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1527e1c0fa38dfb971603f9f59faf7de58c3f313

commit 1527e1c0fa38dfb971603f9f59faf7de58c3f313
Author: Samuel Huang <huangs@chromium.org>
Date:   Wed Apr 8 21:43:14 2026 -0700

    [Android NTP] Fix vertical gaps between adjacent main sections

    The New Tab Page (NTP) has multiple "sections" that are vertically
    stacked. Let's specify these with abbreviations:
    * FSB: Fake Search Box.
    * AIM: AI Mode Button + Incognito Button, AKA Composeplate.
    * MVT: Most Visited Tiles.
    * MS: Magic Stack, AKA New Tab Page Cards.
    * DF: Discovery Feed.

    Note that we're ignoring the Logo (above FSB) and promotion (e.g., for
    Sign in) sections.

    {MVT, MS, DF} may be absent sometimes:
    * NTP Customization can toggle {MVT, MS, DF}.
    * MS dynamically appears / disappears.

    AIM is now a permanent component of the layout and cannot be optionally
    removed.

    Let FSB-AIM be the vertical gap between the FSB bottom and AIM top.
    Similarly, define other spacings. Since {MVT, MS, DF} may be absent,
    there are 7 gap cases: FSB-AIM, AIM-{MVT,MS,DF}, MVT-{MS,DF}, MS-DF.

    Recently we found that these gap sizes are inconsistent. This CL fixes
    the inconsistency by making FSB-AIM = 8 dp, and everything else 16 dp:

      Gap          Old      Goal
      FSB-AIM     9 dp      8 dp
      AIM-MVT    25 dp     16 dp
      AIM-MS     18 dp     16 dp
      AIM-DF     18 dp     16 dp
      MVT-MS     16 dp     16 dp
      MVT-DF     16 dp     16 dp
       MS-DF     16 dp     16 dp

    Strategy:
    * Assign top margins to 12 dp for {FSB, MVT, MS, DF} and 4 dp for AIM.
    * Assign bottom margins to 4 dp. Previously this existed so that
      sections can expand to accommodate shadows. This is no longer
      needed, but we keep the margin anyway as buffer space.

    Note that 4 dp + 12 dp = 16 dp, which will be the standard spacing
    between sections; and the FSB-AIM exception is managed by 4 dp + 4 dp.

    In a previous CL (crrev.com/c/7603164), we removed the dynamic resizing
    logic that was previously required to accommodate the AIM view's shadow.
    With that logic removed, we can now rely entirely on these static
    margins, greatly simplifying the spacing definitions.

    Details:
    * For common dimensions define and use:
      @dimen/ntp_section_top_margin = 12 dp
      @dimen/ntp_section_bottom_margin = 4 dp
    * For AIM top margin define and use:
      @dimen/composeplate_view_margin_top = 4 dp
    * Define "padding" quantities to replace previous uses of
      section-specific "margin" quantities for padding.
    * Update ShowNtpAtStartupTest to expect the new standardized
      @dimen/ntp_section_bottom_margin on the MVT container.
    * Bump revisions in TabSwitcherLayoutPTTest and FeedV2NewTabPageTest to
      trigger Skia Gold rebaselines for the new spacing.

    Bug: 481717794
    Change-Id: I77adb4c8980a3bc2e0803a5b6cd0b2ac7a66d48a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7589698
    Commit-Queue: Samuel Huang <huangs@chromium.org>
    Reviewed-by: Brandon Wylie <wylieb@google.com>
    Reviewed-by: Xi Han <hanxi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1611969}
2026-05-22 16:18:05 -04:00
samartnik cd9dbfdef5 [Android] Unify switch style across the app (#36652) 2026-05-22 16:35:58 +01:00
Aleksei Seren bb3c4fe724 Remove Brave News inline content ads dead code on Android (#36539)
The Brave News inline content ads pipeline is already disabled via
https://github.com/brave/brave-core/pull/32359. This PR removes the
remaining inline content ads Android code and mojom code that no longer
has any effect.
2026-05-21 14:16:24 -05:00
samartnik 1daed5967d [Android] Fix for the shields layout in a certain configs (#36522)
* [Android] Fix for the shields layout in a certain configs

* [Android] Update javadoc
2026-05-19 20:39:14 +01:00
samartnik 707ea40d02 [Android] Adjust brave buttons layout size and margins to the address bar (#36481)
[Android] Adjust brave buttons layout size and margins

This adjusts it to the size and margins of the address bar in the upstream.
2026-05-15 14:41:23 -04:00
vadims fb01221cb5 [Android] Update Shred Settings UI (#36431)
Added Shred settings UI modifications and an additional element to 
manage the browsing history shredding flag.

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

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2026-05-15 10:09:09 +02:00
Oliver 24ffd451b0 Android: Remove Password Manager's redundant help/exit title icons (#33858)
Within the Password Manager UI, the title bar contained two redundant
icons to the left of the title:

1. The help icon - since it only takes the user to the generic help
   page, this isn't particularly "helpful"
2. The 3 vertical dots simply display an exit option which is also
   redundant since the back arrow does the same thing.

Resolves brave/brave-browser#52765
2026-05-13 19:09:19 +01:00
samartnik 98cc61c247 [Android] Fixes for orientation lock for VPN and Playlist activities (#36376)
* [Android] Fixes for orientation lock for VPN and Playlist activities

* [Review] Use "Checked" Companion Methods for Effectively Non-Null Returns
2026-05-13 10:52:12 -04:00
Simone Arpe f1cd4c159b Show new onboarding by default (#36349)
Shows the new onboarding flow by default and removes old unused code in
Java, XML layouts and strings.
2026-05-12 18:07:13 +02:00
Szilard Szaloki f9adffdb91 Account: add "outside" icon to Log out buttons (#36327) 2026-05-11 20:55:05 +01:00
AlexeyBarabash ad8f9b8fe5 [Android][cr148] Fixed margin for Sync QR code (#36026)
Resolves: https://github.com/brave/brave-browser/issues/55092
2026-04-30 11:26:07 +03:00
Serg 4864534b90 [Android] Migrate private NTP to Leo tokens and fix VPN icon visibility (#35905)
* [Android] Migrate private NTP to Leo tokens and fix VPN icon visibility

- Drop Brave-local duplicates of ic_product_vpn / ic_antenna /
  ic_product_private_window so the private NTP renders the Leo
  (Nala) icons via resource_overlay; tint the inner icon layer to
  primitive_private_window_60 in IncognitoNewTabPageView so the
  designed purple still wins on the fixed-dark surface.
- Remove Brave-local primitive_private_window_5/10/20/60/80/90 from
  brave_colors.xml; references now resolve through Leo's primitive
  scale (same hex for _60/80/90; slight neutral shift for _5/10/20).
- Remove the runtime setBackgroundColor on the scroll view that was
  masking the gradient drawable defined in the layout XML.
- Switch the private-tab logo to ic_social_brave_release_favicon_-
  fullheight_color (Leo) and size in dp (42 phone, 56 tablet) to
  match Figma and to stop scaling with accessibility font size.
- Resize circle drawable to 32x32 (was 32x33), constrain inner icon
  via new_tab_page_incognito_icon_inner_size (20dp / 24dp tablet),
  and grow circle to 48dp on tablets.
- Introduce per-form-factor style aliases (IncognitoNtpTitle /
  SectionTitle / SectionDescription / Cta) under values/ +
  values-sw600dp/ so phones and tablets land on the right Leo
  typography ramp without per-TextView attributes.
- Delete the now-dead ntp_bg_incognito and incognito_modern_-
  primary_color color entries.

Resolves: https://github.com/brave/brave-browser/issues/53958
2026-04-27 10:22:07 -04:00
AlexeyBarabash 2a0d8de9ef Android settings containment (#35636)
* [Android] Fixed containment at settings

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

* Fixed containment for the Homepage settings screen
* Fixed containment for WebRTC policy screen
* Fixed containment at Languages settings; modified SettingsUtils.getVisiblePreferences
* Fixed  privacy item
* Fixed containment for NFT discovery learn more preference
Replaced TextMessagePreference (BackgroundStyle.NONE, transparent) with
ChromeBasePreference so the NFT description groups with the Enable NFT
discovery toggle in one card. Follows the same camera OS-warning pattern:
ForegroundColorSpan for the link color, setOnPreferenceClickListener for
the tap action, matching Chromium upstream conventions.
* Moved NFT discovery block before Reset wallet preference
Enable NFT discovery toggle and its description now appear above
"Reset and clear wallet data", matching the intended UX order.
* Fixed containment for Brave Firewall + VPN settings
Set initial visibility of server_change_location in onCreatePreferences
to avoid animated removal artifact. Call notifyPreferencesUpdated() after
dynamic visibility changes in updateSummaries so containment styles stay
in sync with adapter positions.
* Fixed containment for New Tab Page settings learn more
Replaced ClickableSpansTextMessagePreference with ChromeBasePreference
for the sponsored images learn more link so it groups into the
Background Images card with the toggles above it.
* Removed On/Off captions from New Tab Page switch prefs
2026-04-25 18:49:09 +03:00
Serg a59d89fa21 [Android] Update Brave Origin paywall and settings copy per design feedback (#35700)
String changes in android_brave_strings.grd:
- IDS_MENU_ORIGIN: "Origin" -> "Brave Origin" (Settings menu row).
- IDS_BRAVE_ORIGIN_PREMIUM: "Origin" -> "Brave Origin" (paywall title).
- IDS_ORIGIN_LEO_AI_TOGGLE: "AI" -> "Leo AI" (toggle label
  consistency with other Leo surfaces).
- IDS_ORIGIN_DESCRIPTION_BODY: drop the trailing sentence
  "Origin will remove most other features from the browser."
- IDS_ORIGIN_CHANGING_BRAVE_FEATURES_MESSAGE_POST_PURCHASE:
  "once Origin has finished updating." ->
  "once Brave Origin has finished updating."
- IDS_ORIGIN_PAYWALL_TEXT_4: rewritten to
  "One-time purchase can be activated multiple times across all
  your devices".
- IDS_ORIGIN_DESCRIPTION_NOTE: removed entirely (Search Premium
  note no longer shown).

Layout changes:
- brave_origin_description_preference.xml: remove the
  origin_description_note TextView from the preference-screen
  description block.
- activity_brave_origin_plans.xml (portrait paywall) and
  layout-land/activity_brave_origin_plans.xml (landscape
  paywall): remove the note TextView; body description's bottom
  margin bumped from 16dp to 24dp to preserve spacing with the
  next section.

Resolves: https://github.com/brave/brave-browser/issues/54761
2026-04-21 01:14:29 +01:00
samartnik f717b29ba2 [Android] Fix for custom search engine footer with settings containment (#35673) 2026-04-20 11:51:28 -04: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
AlexeyBarabash 5e58cbf234 Fixed search settings for Brave's languages page (#35544)
Resolves https://github.com/brave/brave-browser/issues/54524
2026-04-16 11:08:29 +03:00
Szilard Szaloki d615f4b477 Account: moves to OTP-based email verification (#35502) 2026-04-16 05:42:25 +01:00
Simone Arpe e21d548ec2 Adjust widget text gravity (#35430) 2026-04-10 18:24:08 +02:00
Terry ManceyandAleksei Seren 4cce300eba [ads] Remove custom push notification ads (#35137)
Custom push notifications rendered notification ads as popup windows as a
fallback when native OS notifications were unavailable. Native notifications
are now the only delivery path so the entire custom rendering path, its
feature flags, platform bridge, Views UI, Android dialog UI, P3A position
metric, and three migrated prefs are removed.

Co-authored-by: Aleksei Seren <aseren@brave.com>
2026-04-03 09:09:44 -05: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
Serg 62575a9e0b [Android] Show loading state in Origin preferences during post-purchase credential fetch (#34955)
* [Android] Show loading state in Origin preferences during post-purchase credential fetch

When a Brave Origin purchase is completed, there is a delay while the
receipt is passed from Play Store to the SKUs SDK via
fetchOrderCredentials. During this time, the Origin preferences screen
opens but credentials aren't ready yet.

- Disable all toggles and clickable preferences until
  fetchOrderCredentials completes
- Show a snackbar with "Disabling features" spinner instead of
  "Restart now" during the credential fetch
- On success, re-enable preferences and transition to "Restart now"
- On failure, close the preferences screen
- Always show restart snackbar on toggle change regardless of
  setPolicyValue result, since failure means a restart is needed
- Remove duplicate color definitions (schemes_primary_fixed_dim,
  schemes_on_primary_fixed, semantic_text_secondary,
  semantic_text_tertiary) that already exist in nala tokens

Resolves: https://github.com/brave/brave-browser/issues/53915
2026-03-25 15:54:01 +01:00
samartnik afb83224c9 [Android] UI preparation for custom search engines (#34890)
This PR is only prepares UI and strings, the main implementation will be done separately in the context of brave/brave-browser#21837
2026-03-23 15:33:09 -04:00
Simone Arpe dbb3f73525 Add YouTube filter options under Settings → Media (#34779)
Adds four filter options, already present in Shields & privacy → Content filtering, and include them also in Settings → Media → YouTube section.
Each filter option is synchronized in both sections (i.e. modifying an option under Settings → Media will be reflected in the other section accordingly).

The YouTube section is also reordered:

Block YouTube Shorts
Block YouTube Playables
Block YouTube recommended content
Block YouTube distracting elements
Block YouTube thumbnails
Block YouTube auto-dubbed videos
Block YouTube members-only videos
2026-03-17 21:32:18 +01:00
Szilard Szaloki 8dc92ab21c Account: changes the title label for logged-in users (#34707) 2026-03-14 05:14:17 +09:00
AlexeyBarabash e8302c177f Android settings search indexes (#34576)
Added support for search indexes for Brave preferences fragments
2026-03-12 23:20:56 +02:00
Simone Arpe 61a9a1434a Rename onboarding variants X and Y to avoid name collision (#34566)
Uncomments `getDayZeroVariant` to fetch the variant names and it renames them to X (default) and Y (new onboarding) to avoid naming collision with NTP A/B study.
2026-03-11 17:27:54 +01:00
Serg ae69664eab [Android] Clean up Origin preferences and implement reset/link purchase (#34535)
- Remove unused "Crash reports" toggle (no policy mapping)
- Remove "Manage account" preference
- Rename "Leo AI" toggle label to "AI"
- Implement "Reset to defaults" with confirmation dialog
- Implement "Link purchase" to open Brave account linking page

Resolves: https://github.com/brave/brave-browser/issues/53435
2026-03-06 17:28:33 -05:00
Simone Arpe d81a0e484e (Wallet) Fix edit fee dialog styles (#34388)
* Switch from `getActivity()` in favor of `requireContext()`

* Improve Edit Fee dialog styles

* Fix window leaked upon config changes

* Fix presubmit warning
2026-03-04 13:22:38 +00:00
Simone Arpe 3ea61f5823 (Wallet) Add padding to avoid focus ring cut off (#34389)
Add padding to avoid focus ring cut off
2026-03-04 10:35:59 +00:00
vadims f13eac71f2 Global Shred site's data preference is not available in settings under Brave Shields & privacy (#34391)
Fixed global auto-shred settings to be displayed in Settings under
Brave Shields & Privacy when the Shred feature is enabled.

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

Signed-off-by: Vadym Struts <vstruts@brave.com>
2026-03-04 11:01:13 +01:00
Serg 7246781c90 [Android] Use Leo design tokens for icons in Brave Origin settings (#34411)
Migrate Origin settings icons from custom drawables with hardcoded fill
colors to Leo design token equivalents that use @color/icon_default for
proper dark theme support. Remove manual icon tinting code that was
working around the hardcoded colors.

Resolves: https://github.com/brave/brave-browser/issues/53334
2026-03-04 01:20:01 +01:00
Simone Arpe 32a340275c Fix HeadingH1/2/3/4 by adding android:textStyle bold (#34355) 2026-03-02 16:49:20 +01: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
Serg aa2fcc5c1f [Android] Fix in-app review flow crash on Play Store split APK installs (#34229)
PlayCoreDialogWrapperActivity (from core-common) lives in base.apk
but deserializes a Parcelable (review.zzc) from split_chrome.apk.
The base split's ClassLoader can't see chrome split classes, causing
ClassNotFoundException. Chromium fixes this for its own activities
via BundleUtils.checkContextClassLoader(), but PlayCoreDialogWrapperActivity
extends plain Activity and is not covered.

Fix by registering an ActivityLifecycleCallbacks that sets the
Application's ClassLoader on the Intent extras Bundle before onCreate().

Also adds a QA preference to force the in-app review flow from settings
for easier testing.

Resolves: https://github.com/brave/brave-browser/issues/53179
2026-02-26 23:19:42 +00:00
Jay Harris 8e844ac29c [Nala]: Replace Android settings icons with Nala icons (#34175) 2026-02-26 10:33:59 +13:00
Serg 7b3ef42db3 [Android] Switch Origin billing from subscription to one-time purchase (#34070)
Brave Origin on Android was scaffolded as a subscription (monthly/yearly)
but never shipped. This switches it to a one-time perpetual purchase
using BillingClient.ProductType.INAPP instead of SUBS.

Changes:
- Replace Origin subscription product IDs (monthly/yearly) with perpetual
  IDs: brave.origin.perpetual, beta.origin.perpetual,
  nightly.origin.perpetual
- Add dedicated INAPP query (queryOriginProductDetailsAsync), purchase
  initiation (initiatePurchaseInApp), and price formatting methods for
  one-time purchases which don't use offer tokens or subscription phases
- Update queryPurchases to use ProductType.INAPP when querying Origin
- Wire up BraveOriginPlansActivity billing flow: product details loading,
  price display, and Buy Now button
- Add "Consume Origin Purchase" option in QA Developer Preferences to
  allow testers to clear the Play Store entitlement for re-testing
- Clean up BraveQAPreferences: migrate from android.app.AlertDialog to
  androidx.appcompat.app.AlertDialog and from SharedPreferences to
  ChromeSharedPreferences

Resolves: https://github.com/brave/brave-browser/issues/53006
2026-02-19 22:35:34 +00:00
Simone Arpe 8439975265 Implement tablet layouts for new onboarding flow (#33936)
Implements tablet layouts for new onboarding flow study following Figma design.
2026-02-17 14:26:37 +01:00
Szilard Szaloki 5374ffa9c7 [Android] Account: middle-truncate email addresses (#33962) 2026-02-16 01:04:13 +00:00
Serg 5a32bc88c0 Update Android Origin payment UI from subscription to one-time purchase (#33950)
Update Android Origin paywall from subscription to one-time purchase

- Replace monthly/yearly subscription plan selectors with single "One Time Purchase" plan row
- Add 4th feature benefit: one-time purchase, no subscription cost
- Add Origin description and Brave Search Premium note sections
- Replace "Try 7 days free" with "Buy now" button
- Replace "Refresh your credentials" with "Get a login code" button
- Remove "Learn more about Origin" button and unused resources
- Update text styles per design spec
- Comment out billing integration for later hookup

Resolves: https://github.com/brave/brave-browser/issues/52855
2026-02-14 04:20:39 +00:00
Serg fc1c6e3181 [Android Origin] Update Android preferences UI and add restart snackbar (#33867)
Redesign the Origin preferences screen: add a custom restart
snackbar with dismiss button shown on toggle changes, split then
description into styled title/body/note sections, and rename
the bottom section from Subscription to Purchase.

Resolves: https://github.com/brave/brave-browser/issues/52774
2026-02-12 00:36:30 +00:00