Commit Graph
4097 Commits
Author SHA1 Message Date
Deep Pandya 2cfff090f4 Update changes for always on to auto reconnect (#28615)
* Update changes for always on to auto reconnect

* ADd quotes to hightlight Block connections without VPN
2025-04-13 23:16:06 +02:00
Deep Pandya 9ab567c852 Resolve encoding issue (#28622) 2025-04-12 02:26:48 +02:00
Simone Arpe f369bb2e44 Retrieve profile using dependency injection in Wallet settings (#28608)
Retrieve profile using dependency injection rather than static method
2025-04-11 16:24:15 +02:00
Deep Pandya 59c1151ac1 Remove request to relaunch app for stats and top sites (#28571) 2025-04-08 22:12:05 -04:00
Deep Pandya 5b8422fd8c Resolve custom tab activity hidden bottom bar issue (#28549)
* Resolve custom tab activity issue which hides bottom toolbar

* Only show bottom controls when bottom toolbar is enabled

Refactor activity finish

* override finish to make sure of activity closure
2025-04-08 20:53:24 -04: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
Artem Samoilenko 0898ccd2dc [Android] Prsubmit issue fix 2025-04-02 16:05:59 -04:00
Artem Samoilenko 656c1f4355 [Android] Fix for menu position in overview mode 2025-04-02 15:56:40 -04:00
Deep Pandya 9fd91d3235 Add notification permission for rewards 3.0 (#28453)
Limit ask for the permission to 3 times
2025-04-02 03:58:43 +02:00
Serg 1415725462 An attempt to fix a crash on template_url_service pointer access on Android (#28448)
* An attempt to fix a crash on template_url_service pointer access on Android
2025-04-01 21:54:34 -04:00
AlexeyBarabash 94b880c97f Revert 'Disable refresh of Brave Leo at the panel #21117' (#28369)
Revert 'Disable refresh of Brave Leo at the panel #21117'; fixes brave/brave-browser#45026
2025-04-01 18:39:15 +03: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 2ad51c8065 Remove chrome widgets (#27724)
* Remove chrome widgets

Add bytecode changes for quick action search widget

* Add patch to remove chrome widgets from manifest

* Add bytecode tests for method exists

* Update AndroidManifest patch

* Add lint suppression for R.drawable.hairline_border

* Update Bytecode test

* Add classes to apk_for_test

* Add QuickActionSearchWidgetProviderDino test flag

Add QuickActionSearchWidgetProviderSearch test flag
2025-03-31 18:34:40 +02:00
Deep Pandya 5f0b8bbe5d Change yahoo search JP position to top (#28402) 2025-03-31 18:29:58 +02: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
Deep Pandya f521eb37d2 Fix the CustomTabActivity freezing issue caused by touch events (#28374)
* Fix the CustomTabActivity freezing issue caused by touch events being blocked during the enter animation.

* Add supression for unused variable
2025-03-28 21:54:21 -04:00
Artem Samoilenko d0a6a9a06e [Android] Update icon names to match Figma 2025-03-27 13:10:04 -04:00
Artem Samoilenko 760174f5e7 [Android] If statement optimization (code review suggestion) 2025-03-27 09:11:24 -04:00
Artem Samoilenko 152d7a4103 [Android] Additional improvements for bottom address bar
- Moved address bar to bottom on NTP
- Moved menu and updated menu icons and texts
- Added request for relaunch when bottom navigation controls are enabled
- UI and visual improvements
2025-03-27 09:11:22 -04:00
AlexeyBarabash ff83351b09 Changed presubmit rules severity to error for more rules (p3) (#26924)
Changed presubmit rules severity to error for:
- AvoidStarImport;
- ModifierOrder;
- RedundantImport;
- PackageName;
- SimplifyBooleanExpression;
- SimplifyBooleanReturn;
- TypeName;
- ConstantName.
2025-03-25 16:57:47 +02:00
Jay Harris d8e73170c8 [Omnibox]: Hide OnDeviceHeadProvider suggestions when top suggestion are disabled (#28094)
* [Omnibox]: Hide OnDeviceHeadProvider suggestions when top suggestions are disabled

* Setup OnDeviceHeadModel
2025-03-24 09:33:38 +01:00
Terry Mancey f1545f26f0 [ads] NTT metric reporting (#28080)
* [ads] Report new tab page ad metrics via confirmation with an optional fallback to P3A

* [ads] Always serve new tab page ads through the component

* [ads] Do not frequency cap last served new tab page ad

* [ads] Deprecate redundant conditon matcher code

* [ads] Transition to v4 confirmation endpoint

* [ads] Include firstTime in the confirmation payload if it is the first impression for the campaign

* [ads] Deprecate HTTP_IM_A_TEAPOT

* [ads] Do not load unnecessary resources

* [ads] Migrate P3A opted-in status

* [ads] Deprecate AdInfoMatchesSponsoredImage

* [ads] Add ad events to brave://ads-internals

* [ads] Optimize firstTime database query

* [ads] Purge ad events when opting out

* [ads] Add grace period

* [ads] General code health

* [ads] Purge Brave News ads for all users when opting out
2025-03-21 17:01:23 +01:00
Deep Pandya 86e6934b52 Remove search engine onboarding (#28230)
* Remove search engine onboarding

* Remove onUrlFocusChange callback
2025-03-21 00:15:47 -04:00
Deep Pandya 637c20608e Add an option to remove Leo from quick search engine bar (#28229) 2025-03-20 14:29:57 -04:00
Max Karolinskiy 0bdf57bb1c Merge pull request #28208 from brave/cr135.x
Upgrade from Chromium 135.0.7049.17 to Chromium 135.0.7049.26
2025-03-20 10:24:05 -04:00
Deep Pandya c6cad964b8 Resolve search engine onboarding selection (#28206)
* Resolve search engine onboarding selection

* Resolve presubmit issue
2025-03-20 08:16:25 +01:00
AlexeyBarabash ad504cefe0 [cr136][Android] New arg at ChromeDialog.ctor - shouldPadForWindowInsets
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1ba995f4717a3293bb336a6869d4b6e7ec4cc292

	[E2E] Wraps ChromeDialog with EdgeToEdgeBaseLayout

	Wraps ChromeDialog with EdgeToEdgeBaseLayout so that ChromeDialog has
	the correct padding for the status bar.

	Before:
	http://screencast/cast/NDU3MDg1MTAyNTM1NDc1MnwwN2M2ODVlYS1iNA

	After:
	http://screencast/cast/NTY4MjM0NTgxMzIxMzE4NHw0MzhmOWIxYi03Nw
	http://screencast/cast/NTkzODc2MjI3Mjk5NzM3Nnw5MzMzZGMzMi00Ng

	Bug: 399276320
	Change-Id: I37db9102a2a07f5416ffbd37549565bc127de8f2
	Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6336801
2025-03-19 18:08:45 -04:00
AlexeyBarabash 498a827e46 Fixed Tabs menu position for some languages (#27982)
* Fixed Tabs menu position for some languages; fixes brave/brave-browser#44274

* Test for main preferences order on Android
2025-03-19 20:52:30 +02:00
Simone Arpe ca2dd2319d Modify Chromium files to fix PIP behavior (#27849) 2025-03-19 19:46:21 +01: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
Artem Samoilenko 3a8d19a428 [Android] New c-tor signature for StatusBarColorController
Chromium change:
https://chromium.googlesource.com/chromium/src/+/6b88305d9871a487e87b7eb9991f5fbe36940d85

[TSLO] Fix status bar coloration in desktop windowing mode

The status bar currently always uses the default tab strip background
color on a tablet when the strip is visible irrespective of the focus
state of the activity window. The strip background color changes from
the default for an unfocused desktop window and if the status bar is
contiguous with an unfocused desktop window, it incorrectly still uses
the default color that is applied only to a focused tab strip.

This CL makes an update to ensure that the status bar uses the same
color applied to the tab strip, which can be impacted by the activity
focus state.

Before:
https://screenshot.googleplex.com/9uKWnPUYcouZFSm
After:
https://screenshot.googleplex.com/AQVoLoAkvwqVvQG

Bug: 393443576
2025-03-18 20:02:19 -04:00
Artem Samoilenko 37134ad086 [Android] Rename appearance settings resource
Chromium change:
https://chromium.googlesource.com/chromium/src/+/791fd6f95c875db2e132bee7f831563c690fe001

Add "Theme" settings menu option to new "Appearance" settings page.

This CL adds the "Theme" settings menu option to the new "Appearance"
settings page. In a follow up CL, a pref summary will be added as well.

Design: http://shortn/_oxzSbwNuTe

NO_IFTTT=New check

Bug: 397775252
2025-03-18 20:02:15 -04:00
Artem Samoilenko c166457a82 [Android] Extract manager opening logic to interface/impl
Chromium change:
https://chromium.googlesource.com/chromium/src/+/65edd13188a0eb01fa8e1140b7489a40ee517d52

[bookmarks] Extract manager opening logic to interface/impl

The implementation of this interface can't be modularized. Extracting
the BookmarkUtils methods to an interface/impl combo which can
be used by classes in the bookamrks module.

Bug: 395908100
2025-03-18 20:02:15 -04:00
Artem Samoilenko 2c775fbc18 [Android] Add an interface to BookmarkOpener
Chromium change:
https://chromium.googlesource.com/chromium/src/+/164f36baa26b6b6a632131a24284bb64552bceba

[bookmarks] Add an interface to BookmarkOpener

The implementation uses classes which can't be modularized. Adding an
interface in the module, and implementation in chrome/android.

Bug: 395908100
2025-03-18 20:02:14 -04:00
Artem Samoilenko 3c0eb24669 [Android] Replace announceForAccessibility for swipe refresh
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b5ff4cc80a3aacfb1c940be791618dd3fa861c83

Replace announceForAccessibility for swipe refresh

Before (notice that disruptive announcements are in red text): https://screencast.googleplex.com/cast/NDk5ODE0NzcyNTA2NjI0MHxlODQ5MzYzZC1iZQ
After: https://screencast.googleplex.com/cast/NTg1MTAyMzMzODg5NzQwOHw4ZDY3MzM0Ny02OA

Fixed: 376746797
2025-03-18 20:02:13 -04:00
Artem Samoilenko f65a1f40a6 [Android] Modularize bookmarks browser code
Chromium change:
https://chromium.googlesource.com/chromium/src/+/088816e5c47905f8b4e16dd867cddaf24fb4f55f

[bookmarks] Modularize bookmarks browser code

Moved production bookmarks browser code to chrome/browser/bookmarks
directory. Made some small changes along the way to simplify the
process.
* Moved all production bookmarks browser code to module.
* Added a separate target for files that can be modularized now.
* Added a separate gni list for files that can't be modularized now
  which is included in chrome_java directly. Over time I will refactor
  those files so that they are moved into the main modularized target.
* Merged ReadingListUtils and BookmarkUtils. In the long run, browser
  reading list code shouldn't really exist since the concepts are
  merged at the native level.
* Moved one method from BookmarkUtils to BookmarkModel to allow for
  more files to be modularized.

Eventually some files, particularly implementations of interfaces
defined in chrome/browser/bookmarks, will live in the unmodularized
directory.

Bug: 395908100
2025-03-18 20:02:13 -04:00
Artem Samoilenko 7a709f9a7f [Android] Start BookmarkEditActivity with a Profile reference
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c8fb92435a71fea2d250d7ca8a90749414bfba0b

Start BookmarkEditActivity with a Profile reference.

Bug: 40254448
2025-03-18 20:02:09 -04:00
Artem Samoilenko 61c7e2c3e5 [Android] Pass profile reference to BookmarkActivities
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e1fc3080db043124e75031b233f0808c057cc78c

Pass profile reference to BookmarkActivities.

Instead of loading getLastUsedRegularProfile, the calling activity will
serialize the current Profile state into the activity and the receiving
BookmarkActivity will use that to load the correct Profile.

While this CL enables the profile loading capability into the base
class of SynchronousInitializationActivity, it is only used by
BookmarkActivity and all other activities should use the legacy code path.

This will be the first production usage of ProfileResolver.

One assertion made in SynchronousInitializationActivity is that if the
profile is not resolved, then the activity will be directly finished.
This will happen in cases where the activity was started with an
incognito profile, then the task is killed by the OS (for debugging,
turn on don't keep activity in Android's developer settings), and
then restarted from recents. I don't think any of these activities
should be recreating the incognito profile that has since been destroyed, and instead should just return to the activity below it in
the task. In the future, we could consider variable recovery paths, but
I think that would be premature optimizations at this point.

Bug: 40254448
2025-03-18 20:02:05 -04:00
Artem Samoilenko 90644635f9 [Android] Changes for partner bookmark initialization
Chromium change:
https://chromium.googlesource.com/chromium/src/+/25845008b79c77a30986f99ee9bcbff4a81d10f6

Fix partner bookmark initialization.

PartnerBookmarks were previously being initialized in
ChromeActivity, but not all usage of the BookmarkBridge comes
from ChromeActivity derivatives. In particular if you enable
Don't Keep Activities in Android and load the BookmarkActivity,
then leave, then refocus from recents, it would crash on an
assertion that the partner bookmarks weren't loaded.

To fix the above issue, this moves the PartnerBookmark init
into the process initialization code path that runs once per
application init.

Subsequently, I was trying to move around when the initialization
happened and the internal implementation crashes because it can
not be called on the main thread (no idea why we aren't seeing
this in the wild), so this adds a async way of fetching the down
stream implementation (subsequent patch will utilize it).

Bug: 384197258
2025-03-18 20:02:05 -04:00
Artem Samoilenko 81d960dfc6 [Android] Add a cold start metric for NTP
Chromium change:
https://chromium.googlesource.com/chromium/src/+/4cefe9fea9bfad8d1f4066460a5da16019812b32

[NTP Startup] Add a cold start metric for NTP loads on Clank

Current start metrics work with webpage or FDT launches. With Clank Home
Frequency being increased, the current startup guardian metric's volume
has been diluted.

This CL adds a cold start metric to capture load times for NTP launches.

The metric is recorded when FeedSurfaceProvider's view (root NTP view)
calls onDraw. Specifically, the metric measures the time from activity
creation to the time when the first draw pass occurs on the root view.
This is similar to a previous NTP startup metric
(NewTabPage.TimeToFirstDraw2) that has been deprecated, but utilizing
new cold-start heuristics and recording the time from activity start
instead of the start of NTP construction.

Bug: 369109839
2025-03-18 20:02:03 -04:00
Darnell Andries 6ef46b38e1 Merge pull request #28147 from brave/android-p3a-crash-fix
Attempted fix for Android P3A crash
2025-03-17 15:10:38 -07: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 ca1faaef30 Only set SE for standard tab from search onboarding (#28155)
Only set SE for standard tab from serach onboarding onboarding

Remove yandex as default SE for private mode in supported region
2025-03-17 12:39:21 -04:00
1b22bfb8d5 Search default updates (Japan) (#27758)
* Update search defaults

Fixes https://github.com/brave/brave-browser/issues/44148

* Remove search engine onboarding for JP

* Set yahoo jp as a default search to NTP search widget

* fixup! Set yahoo jp as a default search to NTP search widget

* Fixed test failure from null local_state

---------

Co-authored-by: deeppandya <deeppandya91@gmail.com>
Co-authored-by: Simon Hong <shong@brave.com>
2025-03-14 11:01:01 -07:00
Darnell Andries 0eef48fdfa Attempted fix for Android P3A crash 2025-03-13 16:36:22 -07:00
vadims b3e162dba1 Additional Shields menu item to show all blocked elements(same as reset) (#27910)
Additional Shields menu item to show all blocked elements(same as reset)
(https://github.com/brave/brave-browser/issues/43955)

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2025-03-13 15:54:57 +01:00
Simone Arpe 3ac6102d95 Fix Wallet notifications not shown (#28043)
Fixes an issue affecting Brave Wallet not showing notifications for the
transactions performed after a newly created or restored wallet.
2025-03-12 18:05:57 +01:00
Simone Arpe 8f6f8a31a6 Remove unneeded @MainThread annotation (#28000)
Remove @MainThread annotation
2025-03-07 10:11:19 +01:00
samartnik 92a554d704 Merge pull request #27974 from brave/android_search_widget_suggestions_fix
[Android] Fix for search widget suggestions
2025-03-05 17:41:14 -05:00