Commit Graph
4700 Commits
Author SHA1 Message Date
samartnik 3913d3e4c7 [Android] Fix for mobile bookmarks option (#29417)
* [Android] Fix for mobile bookmarks option

* Nullaway error fix
2025-06-05 16:25:39 -04:00
Serg 7bcbc8bc21 Brings back upstream search widget on Android (#29416)
This is a revert of https://github.com/brave/brave-core/pull/28753
The reason: we received a lot of feedback from frustrated users that
the widget was very useful.
Resolves: https://github.com/brave/brave-browser/issues/46597
2025-06-05 16:17:04 -04:00
aseren 5652fe9124 [ads] Survey panelist: Android (#29360) 2025-06-04 09:04:47 -05:00
Max Karolinskiy f53cb20d4f Updates support links. (#29355) 2025-06-04 06:44:37 -07:00
Serg 387d7e7284 Android filter list service (#29317)
* Passes correct profile to FilterListServiceFactory
2025-05-30 10:03:33 -04:00
Kevin Smith 2f57ca6b1d [Rewards] Remove Rewards 3.0 feature flag (#28199) 2025-05-30 05:54:37 -04:00
samartnik 0ab1d9d12c Merge pull request #29309 from brave/android_bottom_bar_disable_tooltip
[Android] Disables shields tooltip for bottom address bar
2025-05-29 13:14:25 -04:00
Kevin Smith a7a13ddbc0 [Rewards] Update Rewards "how does it work" URL (#29306) 2025-05-29 13:13:49 -04:00
Serg 9dd413a1e0 Use correct profile for Android url sanitizer service (#29206)
* Uses a correct profile for UrlSanitizerService on Android
2025-05-29 18:25:11 +02:00
Artem Samoilenko c7e465595d [Android] Disables shields tooltip for bottom address bar 2025-05-29 11:31:15 -04:00
samartnik 30a6829c08 Merge pull request #29297 from brave/android_default_download_bubble_value
[Android] Changes default value for download bubble notification
2025-05-29 10:07:00 -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
Simone Arpe e2a5b49706 Remove usage of BravePrefServiceBridge for boolean background video playback (#29197)
* Remove usage of `BravePrefServiceBridge` for boolean background video playback

* Use mTabModelProfileSupplier as settings UI always use original profile
2025-05-28 16:05:26 -07:00
Artem Samoilenko 88d89f00b1 [Android] Changes default value for download buble notification 2025-05-28 14:56:31 -04:00
Simone Arpe 1b29335e6d Improve network info checks on DApps (#29227)
Improves the checks against potential null values when connecting Brave Wallet to DApps.
2025-05-26 16:35:37 +02:00
AlexeyBarabash 3d7da33b8e [Android] Prevent cleaning of tab groups without sync id (#29201)
* [Android] Prevent cleaning of tab groups without sync id 
fixes brave/brave-browser#45549
2025-05-23 23:56:25 +03:00
Serg 5d03c4ae86 Use correct profile to create webcompat reporter service (#29175)
* Calls WebcompatReporterServiceFactory under correct profile
* Calls getProfile directly inside Pref fragments as they use an original profile only
2025-05-23 00:15:09 +02:00
Artem Samoilenko 90948704a7 [Android] Fix path for mobile bookmarks 2025-05-20 14:17:58 -04:00
Artem Samoilenko 4eb0fda3a1 [Android] Redirect support and help links 2025-05-20 11:52:42 -04:00
aseren ef0f2a4475 [ads] BraveNewTabTakeoverInfobar @NullMarked code health (#29109) 2025-05-17 05:16:17 +02:00
samartnik 81cd3abcd1 [Android] New Mobile Bookmarks homepage setting (#29051)
* [Android] New Mobile Bookmarks homepage setting

* [Android] Mobile bookmarks string correction

* [Android] Code review suggestions

* Replaces direct patch with bytecode and adds eol

* Moves test method from dummy to the main class

* Direct patch xmls and typo fix

* BaseJUnit4ClassRunner to ChromeJUnit4ClassRunner for tests

* Fixes presubmit issues for tests
2025-05-16 23:05:03 +02:00
aseren d37bc9d72e [ads] Fixes New Tab Takeover infobar is displayed on the incorrect tab on Android Tablet (#29090)
* [ads] Fixes New Tab Takeover infobar is displayed on the incorrect tab on Android Tablet

* Added getTab() != null check
2025-05-15 17:45:13 -05:00
samartnik a2725afde8 [Android] Updates download page menu icon (#29091)
* [Android] Updates download page menu icon

* [Android] Adds header to ic_download icon
2025-05-16 00:38:49 +02:00
samartnik 8fd36b6d2c [Android] Main settings reorganisation (#29086)
- Renamed `Autofill` section to `Passwords and Autofill`
- Moved `Brave Password Manager` and `Autofill services` to the new section
2025-05-15 16:20:27 -04:00
Artem Samoilenko 26550166f3 [Android] Main settings reorganisation
- Renamed `Autofill` section to `Passwords and Autofill`
- Moved `Brave Password Manager` and `Autofill services` to the new section
2025-05-15 13:44:41 -04:00
Artem Samoilenko e34cd34879 Fix method names for ChromeSharedPreferences 2025-05-15 12:26:55 -04:00
Artem Samoilenko dd58099ce3 [Android] Fix for bottom address bar with Enabled default to bottom flag state
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/fb3efd9d8f45b5076ef5cfe3c285797f7968f4f7

commit fb3efd9d8f45b5076ef5cfe3c285797f7968f4f7
Author: Patrick Noland <pnoland@google.com>
Date:   Thu Mar 27 14:47:46 2025 -0700

    [Anchor] Add param that controls the default position of the toolbar

    Bug: 406834895
    Change-Id: I12d10f1cdca6b0e451208d2056dc5c58797546a4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6405136
    Reviewed-by: Gang Wu <gangwu@chromium.org>
    Commit-Queue: Patrick Noland <pnoland@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1439025}
2025-05-15 12:26:51 -04:00
aseren 52b5f658fa [ads] Fixes New Tab Takeover infobar is recreated after rotating the Android device (#29052) 2025-05-14 17:01:46 -05:00
Artem Samoilenko 26bcbbb982 [cr137][Android] Temporary fix for Utils.getProfile
This function should be removed and proper profile should be passed https://github.com/brave/brave-browser/issues/45937
2025-05-13 15:53:30 -04:00
Artem Samoilenko ab3ac1d05f [cr137][Android] Changes for createWebContentsWithWarmRenderer
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b875fe9e2f6b613d0207655bd970a34427210f0d

[Android][3PPWM] Ignore IsEnabled and load config timely for CCTs

CCTs create webContents in a way that doesn't allow reading the pref
before the autofill machinery is initialized. With this CL, the pref
value is passed in on creation which fixes the issue.

Another, less frequent issue is checking isEnabled. This method lazily
initializes Android's AutofillManager and contributes to CCTs
occasionally preventing Autofill use. This is incorrect since the return
value may change while the app is running and isn't suitable for making
an initial decision about whether Autofill should be enabled. The
safeguard this provided is (already or by now) checked in the Android
Framework when the regular notifyViewEntered calls are invoked.

Just out of caution and because this fix affects a fully launched
feature, both changes are guarded with a new feature:
kAutofillVirtualViewStructureAndroidInCct.

Unlaunching the original feature isn't a good option but holding this
fix back is a bad option, too. Therefore, it's default-enabled and
intended to use only as a possible kill-switch.

The change shouldn't affect WebView but we'll add a flag as guard.

go/scrcast/NTMyNTYxNTEwMzIxMzU2OHw1OTZhYTJlZC02Yg

(cherry picked from commit 5bd3d05740695f1e55c34415cb77bdea0e04759c)

DD: go/3ppwm-dd
Bug: 411164104
Fixed: 415734605
Change-Id: Iaf8ac48eef3fbf833d49d67c3e427d8c8d4d53b5
2025-05-13 15:53:29 -04:00
Artem Samoilenko 8f11e3d05f [cr137] [Android] Changes for TopToolbarCoordinator
Chromium change:
https://chromium.googlesource.com/chromium/src/+/a07f47b0d1c1a4d6230e53ef63cb03a23863025e

[M137][New Tab Animation] Add TabCount wrapper

It allows to overwrite the tab count for purposes such as animations.

(cherry picked from commit 33d6d91f9d80104b2c2df62eac5b0d290959361a)

Bug: 410818580
Fixed: 415757905
2025-05-13 15:53:28 -04:00
Artem Samoilenko 715e203869 [cr137] [Android] Allowing edge to edge fullscreen on Android
Chromium change:
https://chromium.googlesource.com/chromium/src/+/6c3184ab7d8bcc7656e61b8c22f18c4a751c7163

Allowing edge to edge fullscreen on Android

Activity.requestFullscreenMode is now used to allow expand free form
window to the edges of the display.

User can exit the display edge to edge mode by clisking esc or dragging
the window from the top of the display.

Screencast before change:
http://screencast/cast/NDk1ODgxMzA4NDk3NTEwNHwwMTVlNmU1My1mMA
after change:
http://screencast/cast/NjA2NTAyNTg2ODM2NTgyNHw5ZjVmNWFkNi0zYQ

Bug: 373304413
2025-05-13 15:53:26 -04:00
Artem Samoilenko aa061ea173 [cr137] [Android] Move onCLick for home button to coordinator
Chromium change:
https://chromium.googlesource.com/chromium/src/+/06770268566c51e3f3039a4be41cd1d9cee21468

commit 06770268566c51e3f3039a4be41cd1d9cee21468
Author: Sirisha Kavuluru <skavuluru@google.com>
Date:   Thu Apr 24 10:11:10 2025 -0700

    [Toolbar] Move onCLick for home button to coordinator.

    Reland of https://chromium-review.googlesource.com/c/chromium/src/+/6444671

    The above CL failed tests since I missed removing setOnClickListener for home button in toolbar tablet while removing onClick() implementation.

    Change-Id: I66ed76f26c1d979f5535d11e351c0fb945ff244a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443761
    Reviewed-by: Patrick Noland <pnoland@chromium.org>
    Commit-Queue: Sirisha Kavuluru <skavuluru@google.com>
    Cr-Commit-Position: refs/heads/main@{#1451247}
2025-05-13 15:53:23 -04:00
Artem Samoilenko 527c099e7f [cr137] [Android] Changes for the edge-to-edge bottom chin feature
Chromium change:
https://chromium.googlesource.com/chromium/src/+/4a0320bb6babe3bcbc220e0c9847f2cd2ea48a45

Default enable the edge-to-edge bottom chin

Launch for the bottom chin: launch/4339772

Intent to ship dynamic safe area insets: https://groups.google.com/a/chromium.org/g/blink-dev/c/hXkimpjYaMg/m/EbDa9c-oAAAJ

Bug: 324436581, 407852142
2025-05-13 15:53:21 -04:00
AlexeyBarabash 5cd09dbdc0 [cr137] Fixed Nullaway warnings 2025-05-13 15:53:21 -04:00
Artem Samoilenko 58e6734aca [cr137] [Android] Fixes for NullAway presubmit errors
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8bafbc5401239117b080d98f49e7bab83eed0e38

Turn NullAway presubmit upload check into an error instead of warning

Bug: 412696018
2025-05-13 15:53:18 -04:00
Artem Samoilenko 8757a298a7 [cr137] [Android] Adds icon for Autofill services setting
Chromium change:
https://chromium.googlesource.com/chromium/src/+/6518be40f7b02e1e973735224d0e994b01e262c6

[Android][3PPWM] Default-enable 3P autofill support

This has been approved in launch/4349206.

Bug: 409579377
2025-05-13 15:53:17 -04:00
Artem Samoilenko 0fac29a2a4 [cr137] [Android] Tab context menu for Tab Group Dialogs
Chromium change:
https://chromium.googlesource.com/chromium/src/+/4de24f972d7e2e062daebcc58856ef7e71091040

[Tab Group Parity] Tab context menu for Tab Group Dialogs

- Now show tab context menu for tab group dialogs
- New interface for showing TabListEditor
- Rename context menu class to TabGridContextMenuCoordinator to resolve naming conflict with `chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListGroupMenuCoordinator.java`
- Recording: https://drive.google.com/file/d/1bXXKs34DMLy5FSXOqnYTaWdaddFjuOcc/view?usp=sharing&resourcekey=0-MNtztibYKcwRsHKRdPDcrA

Bug: 412626589
2025-05-13 15:53:16 -04:00
Artem Samoilenko dff290f724 [cr137] [Android] Add web app header to the main layout
Chromium change:
https://chromium.googlesource.com/chromium/src/+/8cf864537cf0665d3558a5848f92eb469e61fc81

[Minimal UI] Add web app header to the main layout

Integrating web app header into the CCT base activity based on the
feature enabled state and web app launch params.

Support to show web app header in the dialogs will be added in a
separate CL.

HSV: https://hsv.googleplex.com/5366214560841728

Bug: 401230452
2025-05-13 15:53:16 -04:00
Artem Samoilenko 21a2ceee2e [cr137] [Android] Make AppMenuPropertiesDelegateImpl abstract
Chromium change:
https://chromium.googlesource.com/chromium/src/+/19050b6adac2e1f9b0442fc2dc4e58e5e023b251

Make AppMenuPropertiesDelegateImpl abstract.

Previously, the base class had all the logic for tabbed mode, and that
was never accessed by other child classes. This moves the tabbed logic
to the TabbedAppMenuPropertiesDelegate and make the base class abstract.

One of many CLs to try and remove XML menu inflation from the app menu.

Bug: 40145539
2025-05-13 15:53:14 -04:00
Artem Samoilenko 6303275336 [cr137] [Android] Suppress top toolbar scene layer while mini origin bar is active
Chromium change:
https://chromium.googlesource.com/chromium/src/+/44b0ddd43212a03a3a9c7a66c08cd3a0f52b7e4b

[mobar] Suppress top toolbar scene layer while mini origin bar is active

Since the mini origin bar 1) is smaller and 2) looks different from the
scene layer's contents and the Java view will always be visible when
mobar is active, we need to hide it to avoid visual glitches.

Bug: 409317927
2025-05-13 15:53:14 -04:00
Artem Samoilenko 39751f34d6 [cr137] [Android] Remove patch for ExportFlow
Upstream now calls `runCreateFileOnDiskIntent` either way, so this patch becomes obsolete.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/a58bf5281372f484db298f8fcd1c0a8dda0f64a0

[CodeHealth] Clean up LocalPasswordsAndroidAccessLossWarning. Part 1

I've split the cleanup into multiple parts to facilitate the review.

This CL cleans up the code related to password export. It:
1) Enables the feature flag by default in the export flow code.
2) Deletes up ExportWarningDialogFragment that is not used anymore,
and cleans up its tests and strings used only there
3) Deletes PasswordSettingsExportTests, because they test password
export from settings only, and M4.1 export is handled in
PasswordAccessLossExportDialogCoordinatorTest

In the second part I will enable feature by default in other parts of
code.

Change-Id: I233affd3cb8b47cc067a055e92aca219cd5776ef
2025-05-13 15:53:10 -04:00
Artem Samoilenko 9c4c5a701a [cr137] [Android] Throttle tab closure undo snackbar while tab grid dialog visible
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c909285bad37c1d74b163429512d5733f628e260

[A11y] Throttle tab closure undo snackbar while tab grid dialog visible

While the tab grid dialog is visible we disable the UndoBarController
and instead use a custom implementation of the UndoBarController in
TabGridDialogMediator to handle the undo snackbar inside the tab grid
dialog. However, when closing all the tabs shown in the tab grid
dialog we still want to show an undo snackbar using the
UndoBarController. As such the disabled state only exists while the
tab grid dialog is fully visible.

Normally this works fine. However, with recent changes to snackbar
accessibility announcements, the animation would clobber the snackbar
announcing its appearance which is a poor user experience.

This CL introduces the ability to throttle the UndoBarController.
While throttled, tab closure events are queued rather than dropped.
When the throttling is stopped all queued events are displayed. If any
tab closure events become obsolete while in the queue they are
removed from the queue.

The throttling interface is built on TokenHolder and allows multiple
concurrent throttles, only releasing when all throttling is ended.

Presently, there is no TTL for events in the queue as it isn't
necessary for the tab grid dialog case as the period in which events
are only throttled and not dropped entirely is only the duration of
an animation which is very short. Moreover, many actions on the
TabModel force clear the queue, such as opening a new tab.

In the future, if throttling is more prevalent we could elect to
implement a TTL for items in the queue to ensure tabs don't remain
in the pending closure state indefinitely. One possible implementation
is to post a delayed task to wipe an event out of the queue X seconds
after it was added.

Fixed: 39592572
2025-05-13 15:53:09 -04:00
Artem Samoilenko 72060c50ff [cr137] [Android] Changes for saveOffline buttons move
Chromium change:
https://chromium.googlesource.com/chromium/src/+/a3b80168e9abfa063071cc10ab487300c708856f

[Toolbar] Moved click/longClick listeners for bookmark and saveOffline buttons to location bar classes.

* Moved onLongClick for saveOffline and bookmark button to LocationBarLayoutTablet since this has simple implementation.
* Moved onClick for saveOffline and bookmark button to LocationBarCoordinator

Change-Id: I4b97d9209fd04f761e93fe393efe7e0d10f6e0b9
2025-05-13 15:53:08 -04:00
Artem Samoilenko 9cf57ba954 [cr137] [Android] New c-tor signature for ShareDelegateImpl
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d6fc64b0c520c603087467770350a864103ad69b

Check carma phase 2 compliance for OS share sheet

Not CaRMA-compliant car:
https://screenshot.googleplex.com/7SbvEDoQVUYzYnm.png
https://screenshot.googleplex.com/95yX9MypsMhGfU5.png
https://screenshot.googleplex.com/7tm6WS6QLwxX4xX.png

CaRMA-compliant car:
https://screencast.googleplex.com/cast/NTYwMDc2NDY2NjgzOTA0MHxkMzZhNmJiNC01MA

Bug: 408298815
2025-05-13 15:53:08 -04:00
Artem Samoilenko 1c3470e5c2 [cr137] [Android] Separate MultiInstanceManagerImpl
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d3dce6ad13e0b436c737d4573f11caeb878773bb

[MetaClickHistoryNav] Separate MultiInstanceManagerImpl

Keeping abstract class in //chrome/browser/ui/android/multiwindow:java

Bug: 409631603
2025-05-13 15:53:08 -04:00
Artem Samoilenko d873e42e96 [cr137] [Android] Tabwindow moved code into its own module
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d9712a373415d56b728f807a85613036c0115925

[MetaClickHistoryNav] Move tabwindow code into its own module

To remove TabModel's dependency on Multiwindow

Bug: 409631603
2025-05-13 15:53:01 -04:00
Artem Samoilenko 72b16cd130 [cr137] [Android] Refactor classes for improved TextViewWithClickableSpans
Chromium change:
https://chromium.googlesource.com/chromium/src/+/48018d01bf6f0ac186684a9fa73b6a98704ad9c9

Refactor classes for improved TextViewWithClickableSpans

The changes in this CL are preparation for updates in
https://chromium-review.googlesource.com/c/chromium/src/+/6383822.

Bug: 405441323
2025-05-13 15:53:00 -04:00
Artem Samoilenko 7a80025342 [cr137] [Android] Move ButtonData classes from chrome.browser.toolbar to chrome.browser.toolbar.optional_button package
Chromium change:
https://chromium.googlesource.com/chromium/src/+/dfdd24a54d2dc4d911e01f58571a34f4dd277ef5

[Toolbar] Move ButtonData classes from chrome.browser.toolbar to chrome.browser.toolbar.optional_button package.

Planning to create new "ToolbarButton*" classes to manage common code for different toolbar buttons and want to avoid naming confusion with optional button code

Bug: 409638002
2025-05-13 15:52:59 -04:00
Artem Samoilenko fec4844626 [cr137] [Android] Manually specify the next focusable view for the toolbar
Chromium change:
https://chromium.googlesource.com/chromium/src/+/48e1e29f376534ea3238fae1f160832f423712c7

[bookmarks] Manually specify the next focusable view for the toolbar

Bug: 394409324
2025-05-13 15:52:53 -04:00