124 Commits
Author SHA1 Message Date
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
Serg 0bdbd07bdf [Android] Deep link to Brave Origin payment screen for Play promo events (#36556)
Adds support for the https://brave.com/deeplink-android-origin-promo
deep link so that Google Play promotional content events for Brave
Origin can route users directly into the Origin payment screen (or
settings page for existing subscribers).

Routing happens via the existing autoVerified brave.com App Link.
BraveActivity catches the intent before upstream's URL handling in
initializeState (cold start) and onNewIntent (warm start), and the
Play Install Referrer flow continues to support deferred routing for
first-install attribution.

Resolves: https://github.com/brave/brave-browser/issues/55654
2026-05-20 08:58:35 -04:00
Serg 82eaeebda3 [Android] Suppress engagement notifications and promos for Origin users (#35737)
Brave Origin subscribers on Android currently receive general-engagement
notifications and unbidden promo dialogs that are not tied to any
Origin-disabled feature. Suppress them under the product stance that
Origin users get a cleaner, promo-free experience.

Surfaces gated:
- RetentionNotificationPublisher: HOUR_3, HOUR_24, DAY_6, EVERY_SUNDAY,
  and DORMANT_USERS_DAY_14/25/40 notification fire-time.
- BraveActivity: showDormantUsersEngagementDialog (cold-start and
  in-foreground tap paths), India ad-free callout, YouTube-in-Brave
  dialog.

The existing getIsSubscriptionActive() pref only reflects Play Store
purchases, so it misses desktop-linked subscribers. Introduce a new
Java-side cached boolean BRAVE_ORIGIN_CREDENTIAL_SUMMARY_CACHED, written
from two authoritative any-source signals:

- fetchOrderCredentials success (primes the cache immediately on a
  successful Play Store purchase).
- requestCredentialSummary callback (covers Play Store and
  desktop-linked paths; the Skus service resolves both internally).

BraveActivity.finishNativeInitialization now calls
requestCredentialSummary on every app start to keep the cache fresh.

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

* [Review] Optimise check for delete eligibility
2026-04-02 10:03:42 -04:00
Brian Johnson b9811f29a7 Only use brave:// scheme for display (#34610)
brave:// should be converted to chrome:// as early as possible so all internal checks for chrome:// are valid. You can still open brave:// urls and they should display as brave:// urls, but internally both the actual url and virtual url should be chrome://
2026-03-20 00:49:16 +01:00
Serg 8c0ed68c2e [Android] Gate email aliases preference behind kEmailAliases feature flag (#34403)
The email aliases toggle in Brave Origin settings was always visible
regardless of whether the feature flag is enabled. Since the feature is
disabled by default, users would see a non-functional toggle.

Expose kEmailAliases to Java via ChromeFeatureList and hide the
preference when the flag is disabled.

Resolves: https://github.com/brave/brave-browser/issues/53323
2026-03-03 21:36:30 +00:00
Pavel Beloborodov 2ce409f4d0 Localhost Permission => Local Network Access cleanup (#32910)
Brave's custom localhost access permission feature has been replaced with Chromium's Local Network Access (LNA) feature.
2026-01-20 20:20:32 +07:00
vadims f5e7f4b14a [Shred] shred android UI changes add contextual menu (#32834)
Added an ability to start shred manually from two places:
- tab's context menu (includes support of the menu customization)
- tab switch mode
Added confirmation dialog before the site data shred operation

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

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2025-12-17 12:49:24 +01:00
Simone Arpe c1a803c9d3 [CodeHealth] Remove old Android onboarding code (#32681)
This PR focuses on cleaning up Android onboarding and the old the day-zero experiment.

Removed the unused NewAndroidOnboarding feature flag and its references (android/java/org/chromium/base/BraveFeatureList.java, browser/ brave_browser_features.{h,cc}, chromium_src/chrome/browser/flags/android/chrome_feature_list.cc).

Day-zero experiment manager remains unused but now it propagates correctly the assigned variant to Android via JNI, storing it through DayZeroHelper.setDayZeroVariant for Java-side access (android/java/org/chromium/chrome/browser/ day_zero/DayZeroHelper.java).

WelcomeOnboardingActivity is simplified to a single default flow: removed variant-specific paths that were completely unused, consolidated WDP handling, improved exception logging, extracted the leaf animation helper, and other minor enhancement.
2025-12-05 15:40:53 +01:00
samartnik 57dfa92d42 [Android] Respect the user choice on DMA search choice screen (#32532) 2025-11-25 13:44:42 -05:00
Serg a5bc626771 [Android]Renames kBraveFreshNtpAfterIdleExpirementVariant to kBraveFreshNtpAfterIdleExperimentVariant (#32499)
[Android]Renames kBraveFreshNtpAfterIdleExpirementVariant to
kBraveFreshNtpAfterIdleExperimentVariant.

Resolves: https://github.com/brave/brave-browser/issues/51045
2025-11-24 21:29:50 +01:00
Serg 86a4887089 Android new tab page ab test (#32464)
* [Android] Fresh NTP after idle experiment.

Introduces 4 different variants whether to show NTP or not when Brave
is foregrounded.
Resolves: https://github.com/brave/brave-browser/issues/50989
2025-11-21 17:32:50 -05:00
samartnik 0d14b8f81f [Code Health][Android] Clean up generic callback interfaces (#32163)
Here we remove the original interfaces and move them directly to the places they are used.
Interfaces are still genereric, replacing them to a specific interfaces should be done when these parts of code are touched.
In addition, in this PR were fixed presubmit warnings in the files that were touched.
2025-10-31 20:32:21 -04: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
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
Brian Johnson 1f27a328c6 [Speedreader] Remove speedreader on android (#31418)
Remove buggy speedreader implementation on android
2025-09-29 11:52:46 +09:00
Artem Samoilenko a5562072d1 [cr141][Android] Use java.util.function.Supplier rather than Chrome's copy of it
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/94e940f0ad7bd5d37452ee71ab06fe87d675afb2

Use java.util.function.Supplier rather than Chrome's copy of it.
This is 99% sed + git cl format.

The 1% was a couple shims to not break internal builds.
See PS1->PS5 for them.

Bug: 440309602
Change-Id: I9ff8438583286b238505c4f63062279c7b24b254
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6897327
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Owners-Override: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1507988}
2025-09-22 15:02:14 -04:00
Artem Samoilenko ae146154ab [cr141][Android] Changes for TOOLBAR_TOP_ANCHORED option type
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/80937223ea10c49f6c9359d5174a0c9c7283e03c

commit 80937223ea10c49f6c9359d5174a0c9c7283e03c
Author: Peilin Wang <peilinwang@google.com>
Date:   Tue Aug 5 09:08:14 2025 -0700

    [Bottom toolbar] Don't animate position changes if changed in settings

    When the bottom toolbar's position change is animated, the renderer is
    driving the animation by sending the new offsets to the browser on every
    animation tick.

    However, if the position change was done in chrome's settings, the
    browser won't get these updates (I'm guessing because the settings UI is
    covering up the toolbar?) which is why BrowserControlsManager explicitly
    updates the browser's offset when the position changes. However, this
    doesn't work with BCIV, because it causes the browser to submit a frame
    with the new height before viz receives the animation offset from the
    renderer, so the controls could appear to be in the wrong position for a
    frame or two.

    The position of the toolbar was controlled by a boolean
    SharedPreference. This CL adds more state to this SharedPreference, to
    include where the update came from. With this CL, if the update came
    from the settings page, the position change will not be animated.

    Bug: 433524798
    Change-Id: Ic47106b1caec3d99752550edb54476f773553b2e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6811960
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Commit-Queue: Peilin Wang <peilinwang@google.com>
    Cr-Commit-Position: refs/heads/main@{#1496957}
2025-09-22 14:59:34 -04:00
Simone Arpe 673b2e1833 Implement new preference screen "Customize menu" (#31172)
The custom menu item preference screen follows the Figma design and is composed by two sections, Main menu and Page actions.

The screen shows only those items that are supported by the device, items that will never appear won't be shown.
Each item's visibility will default to true and each preference is saved on shared preferences.

The only two items whose visibility cannot be modified are the Main Settings item and the Custom Menu item itself.
2025-09-16 13:54:29 +02:00
samartnik dff110a652 [Android] Adds flag to enable dynamic colors (#30666)
* [Android] Adds flag to enable dynamic colors

* Fixes for browser tests
2025-08-19 15:41:52 -04:00
Szilard Szaloki d07fb818dc Brave Account section in Android settings. (#30354) 2025-07-31 15:31:35 -05:00
Simone Arpe 6e1791f50c Add PIP icon in omnibox (#29431) 2025-07-17 21:17:54 +02:00
aseren 5652fe9124 [ads] Survey panelist: Android (#29360) 2025-06-04 09:04:47 -05:00
Kevin Smith 2f57ca6b1d [Rewards] Remove Rewards 3.0 feature flag (#28199) 2025-05-30 05:54:37 -04:00
Simone Arpe 660020c778 Tweak background video playback description in flag page (#29207)
* Tweak background video playback description in flag page
* Remove redundant call to allow Javascript injection
The method `content::RenderFrameHost::AllowInjectingJavaScript()` is already called in
`background_video_playback_tab_helper` for those domains that correctly have a match so
it's not needed in `brave_browser_main_parts`.
* Fix boolean logic
* Make `IsBackgroundVideoPlaybackEnabled` method more readable
* Remove unneeded predefined default value from XML
* Refactor logic and remove old code
* Enable background video playback preference by default
* Remove unused constant
2025-05-29 11:33:22 +02:00
AlexeyBarabash af6a913380 Fixed some NullAway Java presubmit warnings and suppressed some others (#28726)
* Fixed some NullAway Java warnings and suppressed some others

* Suppressed warning around ContextUtils.getAppSharedPreferences()
because we cannot depend on //chrome from //base to use ChromeSharedPreferences

Fixes brave/brave-browser#45541
2025-04-18 11:57:03 +03:00
Deep Pandya bcb8a0a129 [Android] Yahoo phase 2 (#28494)
* Add changes to change DSE to yahoo

* Add pref for DSE change migration

* Update yahoo jp keyword

Remove log

* Update conditions for the phase 2 check
2025-04-07 21:07:18 -04:00
Deep Pandya 2b756daa09 Android onboarding variants (#28426)
* Add support for diferent variants

* Remove omnibox highlight which shows up right after onboarding

* Add different variants function

* Add search widget promo on NTP

* Add notification permission changes

* Update widget promo UI

* Update wdp check

Resolve presubmit issue
2025-04-03 10:52:03 -04:00
Deep Pandya 0035b7d0f4 Change yahoo search jp position in QSE (#28427)
* Change yahoo search jp position

* Resolve presubmit error
2025-04-01 11:28:25 -04:00
Deep Pandya 35c1670b5f Add DSE check for yahoo JP (#28376)
* Add DSE check for yahoo JP

* Remove logs

* Add deps for prefs
2025-03-31 03:46:00 -04:00
Artem Samoilenko 66c943d90a [Android] Move BraveUrlConstants out of embedder_support component
`BraveUrlConstants` does not extend anything and thus does not belong to `embedder_support` component.
2025-03-18 20:02:25 -04:00
Deep Pandya 83d7e13c44 Add an option to allow users to take screenshots in private mode (#28142)
* Add an option to allow users to take screenshots in private mode

* Update strings for settings option and format code

* Update title/description for private tab screenshot option
2025-03-17 16:57:44 -04:00
Deep Pandya a5c0b652be Rewards 3.0 android (#26945)
* Add rewards 3.0 feature flag

* Add a function to check for rewards 3.0 flag

Update entry points for rewards with rewards 3.0 flag

* Add RewardsPageActivity/RewardsCustomTabRootUiCoordinator to show rewards 3.0 changes in custom tab

* Address rewards reset for rewards 3.0

* Add activity transition for rewards page

* Remove onBackPressed override

* Add close button to close the rewards panel as we have disabled back press

Update close button position on the page

* Add creator changes for rewards 3.0

Remove logs

Add null check

Remove changes for backpress

* Add changes for handling creators

Encode Url for creators

* Add open url native fucntion

* Add bubble in query params

* Add bytecode changes for BaseCustomTabActivity

Add native function to open url into rewards_page_ui

* Update copyright header year

* Update close icon for rewards page

Remove comments and refactor changes

* Address naming related changes

* Add test for bytecode changes

Resolve rebase error

* Update changes to use TabUtils open tab

* Remove close button

* Add FullScreenCustomTabActivity
2025-02-22 16:34:57 -05:00
Artem Samoilenko bb1955f824 [Android] Initial bottom address bar integration 2025-02-05 15:28:16 -05:00
Darnell Andries cf94b54d8b Bootstrap Web Discovery Native, add credential manager and server config loading 2025-01-27 18:22:39 -08:00
SergandFrancois Marier 0fb665213a Adds a settings to show SafeBrowsing errors under Developer options on Android (#27333)
* Adds a settings to show SafeBrowsing errors under Developer options on Android

* Update browser/ui/android/strings/android_brave_strings.grd

Co-authored-by: Francois Marier <francois@brave.com>

* Fixes a header

---------

Co-authored-by: Francois Marier <francois@brave.com>
2025-01-24 10:35:03 -05:00
Jay Harris e1a3daade2 [AI Chat]: Android history setting (#26988) 2024-12-18 11:41:30 -07:00
deeppandya 5b825a1339 Add feature flag for new onboarding 2024-12-17 12:59:47 -07:00
vadims 4be896ea3e Element Picker on Android (#26725)
Element Picker
https://github.com/brave/brave-browser/issues/33241
---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2024-12-16 22:54:44 +01:00
Artem Samoilenko 492239d5f7 [Android] New default value for opening links in a tab group 2024-12-05 09:11:56 -05:00
deeppandya a20c927da4 Chnage default search engine behaviour to show previous deafult search engine always at 3rd position 2024-11-22 17:06:55 -05:00
deeppandya 205fe6d679 Show open YT in brave dialog only once 2024-11-19 15:59:49 -05:00
Deep Pandya 57c35b397e Merge pull request #26539 from brave/update_onboarding_for_ab_testing_android
Update onboarding for ab testing android
2024-11-14 15:19:52 -05:00
vadims 3386ed8a99 Put "block all cookies" under a default-off feature flag (#26479)
Put "block all cookies" under a default-off feature flag
(https://github.com/brave/brave-browser/issues/42061)
---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2024-11-13 22:30:59 +01:00
deeppandya 3b242e0eb5 Update behaviour for set as default dialog 2024-11-13 12:43:12 -05:00
deeppandya 845ab1b9d8 Add feature flag and update existing UI with the flag 2024-11-06 11:18:16 -05:00
deeppandya 5f3e07b298 Add sharedpreferencehelper in util
Add QuickSearchEngineModel
2024-11-06 11:16:38 -05:00
mkarolin 9f2d87a007 Java: replace assert (false); -> assert false;
Presubmit:

 ../../brave/android/java/org/chromium/base/BraveReflectionUtil.java:43: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
                 assert (false);
                        ^
     (see https://errorprone.info/bugpattern/UnnecessaryParentheses)
   Did you mean 'assert  false;'?
2024-10-24 12:14:31 +01:00
Jagadesh P 2e337e7a4e [Android] Rename "show_undo_on_tab_closed" -> "show_undo_when_tabs_closed". 2024-10-21 00:00:39 -07:00