Commit Graph
4302 Commits
Author SHA1 Message Date
Simone Arpe 795271e314 (Wallet) Show warning message changing ownership (#26280)
Shows warning message when a change of ownership is requested for Solana account.
Fixes two crashes affecting signing messages and transactions.
2024-10-31 11:09:23 +01:00
AlexeyBarabash 8c3e3e9971 Add command line key to diagnose Sync Passwords switch issue (#26301)
* Add command line key to diagnose Sync Passwords switch issue

To see additional diagnostic output, add `--verbose_sync_passwords_pref` through QA Preferences/Command line
2024-10-31 09:52:20 +02:00
samartnik 2dc1abf72c Merge pull request #26304 from brave/android_remove_ntp_upstream_item
[Android] Explicitly remove `New tab page cards` from menu
2024-10-30 17:54:10 -04:00
samartnik f3423ebb67 Merge pull request #26302 from brave/android_password_settings_fix
[Android] Fix for crash in Password settings
2024-10-30 17:23:44 -04:00
Artem Samoilenko 1585f4980d [Android] Explicitly remove New tab page cards from menu
This item used in the upstream NTP, that we don't use.
2024-10-30 16:13:46 -04:00
Artem Samoilenko 04ba955eaa [Android] Fix for crash in Password settings
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/df77cbacb9476b0b6d3e75cc34b5d127985e79c3

[Settings] Enable the single-activity mode by default

Bug: b/356743945
2024-10-30 13:08:27 -04:00
Anton Paymyshev afd77d46b6 Support signing typed data on Trezor devices (#26165)
* Support signing typed data on Trezor deivces
2024-10-30 16:09:39 +07:00
Deep Pandya 6aaf5fffe1 Merge pull request #26238 from brave/update_server_selection_settings_option_ui
Update server selection settings option UI
2024-10-25 14:11:15 -04:00
deeppandya 7980b55c50 Update server selection option in settings
Resolve format issue
2024-10-25 12:25:41 -04:00
deeppandya 446a2ae633 Resolve an issue with automatic flag for timezone
Resolve format error
2024-10-25 12:01:41 -04:00
Brian Clifton 8993dc3536 Merge pull request #25662 from brave/cr131
Upgrade from Chromium 130 to Chromium 131.
2024-10-24 14:14:06 -07:00
Deep Pandya 7d8ee6977c Merge pull request #25696 from brave/force-default-browser-prompt-android
Improve Android first run experience for better retention
2024-10-24 09:59:55 -04:00
Artem Samoilenko b0b0aea0f4 [Android] Changes for UMA metrics
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d15dc67556629c7f39c418cd6b81e03c48eee30c

[UPMAccessLossWarning] Add export flow final step metric

The new metric tracks the last step that the user took as part of the
export flow.

Change-Id: I5db5c776b476c49160b39e3f27ee0a50bd8a4d41
2024-10-24 12:14:34 +01:00
Artem Samoilenko 70030bbdd5 [Android] Add EdgeToEdgeStateProvider
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/3d4bd05bd10bced9902f9dd06cf1ad19389c6ba2

Add EdgeToEdgeStateProvider to replace usage of #setDecorFitsSystemWindows

Bug: 369841366
2024-10-24 12:14:34 +01:00
Artem Samoilenko 808436bfbb [Android] Changes for fetching bookmark favicons
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/db64d75a6190bc6f3b1014ba0462f391b2b35135

[bookmarks] Fetch favicons from google if they're not found locally

Bug: 368130323,368683034
2024-10-24 12:14:34 +01:00
Artem Samoilenko a45719da83 [Android] Deprecate tab_groups package
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/65eee63c0e75ebd343c409a7c14addb00ca4b6dd

[Tab Model] Deprecate tab_groups package

Merge the tab_groups/ package into tabmodel/. The two packages have
significant overlap and should really have a lot of their logic merged
anyway.

This allows us to package protect TabGroupModelFilterInternal and make
destroy method package private as well.

Fixed: 372068933
2024-10-24 12:14:34 +01:00
Max Karolinskiy 8c7e8324ae Java formatting fixes. 2024-10-24 12:14:34 +01:00
Artem Samoilenko 2c809f6e46 [Android] Fixes for bytecode unit tests 2024-10-24 12:14:33 +01:00
Artem Samoilenko 9ebf9b477a [Android] Password settings crash fix
Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/df77cbacb9476b0b6d3e75cc34b5d127985e79c3

[Settings] Enable the single-activity mode by default

Bug: b/356743945

https://source.chromium.org/chromium/chromium/src/+/cd5fd3e6bcef39a904578857a4c1ab2419efacec

[Settings] Add a method to finish the current fragment

Some settings page need to finish when the user is done with them.
Previously we used getActivity().onBackPressed() to perform this, but
we might want to handle finish and back gesture differently, and also it
might have unintended interaction with metrics.

This patch introduces a canonical method for settings fragments to
declare that they are finished and the settings activity should show the
previous fragment.

We added the new method to SettingsLauncher because existing methods are
somewhat similar to the new one (handling navigation). In a later change
we plan to rename it to reflect the new addition.

Bug: b/356743945
2024-10-24 12:14:33 +01:00
Artem Samoilenko 7cea364566 [Android] Fix UnusedVariable Error Prone warnings in //chrome/browser
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a94a47d595aa23f7b69db524f490a8bc3559246c

Android: Fix UnusedVariable Error Prone warnings in //chrome/browser

Found by un-disabling the check within compile_java.py

Bug: 372458640
2024-10-24 12:14:33 +01:00
Artem Samoilenko 05f2020427 [Android] Fix for unused private tab resource
We don't use it since we have our own private tab UI.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/11bd4c71e1f22d72e63396f8b47ec3a5ab1957c7

Reland "Use Chrome's fading shadow implementation for IncognitoNTP"

This is a reland of commit 4db7d8944ecd4c49a744497b20a94d74687f3b6b

The CL was causing device offline on Android 13+ due to crash from
emulator GPU mode swiftshader. We have switched the GPU mode to
swangle on Android 13 and 15, and the CL runs fine on these builders.

(Android 14 builder is not switched. But it is not gardened yet so
OK to leave it as broken, and it is easy to make the switch)

Original change's description:
> Use Chrome's fading shadow implementation for IncognitoNTP
>
> Replace the view's fading shadow into Chrome's FadingShadowView and
> FadingEdgeScrollView. This is a workaround that #requiresFadingEdge
> doesn't work with #clipToPadding for ScrollView.
>
> Before (not edge to edge):
> https://screenshot.googleplex.com/9XESPLDvzviZ5cJ
> After:
> https://screenshot.googleplex.com/83Kd2unzVMBjEvr
>
> Bug: 365607068
> Change-Id: Ia156e10712de32f7141f379e1926fbcb3251caf0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5846890
> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> Reviewed-by: Christian Dullweber <dullweber@chromium.org>
> Reviewed-by: Lijin Shen <lazzzis@google.com>
> Commit-Queue: Wenyu Fu <wenyufu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1357331}

Bug: 365607068, 370084605
2024-10-24 12:14:33 +01:00
Artem Samoilenko 11fb643838 [Android] Fixes for lint new warnings
List of the fixed warning types:
warning: [ClassCanBeStatic] Inner class is non-static but does not reference enclosing class
warning: [AlmostJavadoc] This comment contains Javadoc or HTML tags, but isn't started with a double asterisk
warning: [EmptyBlockTag] A block tag (@param, @return, @throws, @deprecated) has an empty description. Block tags without descriptions don't add much value for future readers of the code; consider removing the tag entirely or adding a description.
warning: [ObjectToString] DisplayAd is final and does not override Object.toString, so converting it to a string will print its identity (e.g. `DisplayAd@4488aabb`) instead of useful information.
2024-10-24 12:14:33 +01:00
Artem Samoilenko a8aa9adb60 [Android] Fixes for bytecode unit tests 2024-10-24 12:14:32 +01:00
Artem Samoilenko d18b5c52df [Android] Rename SettingsLauncher to SettingsNavigation
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/79741f6bd5052dbfb30025c44f4b6851cb664e38

[Settings] Rename SettingsLauncher to SettingsNavigation

Now that SettingsLauncher provides a method to go back to the previous
page, it makes more sense to replace "launcher" in its name to something
more generic.

This patch renames SettingsLauncher and its friends to
SettingsNavigation. Also, methods in the interface are renamed to drop
mentions of "activity" since they don't necessarily start a new activity
in the single-activity mode.

Summary of changes:
- SettingsLauncher -> SettingsNavigation (w/ variants)
- launchSettingsActivity -> startSettings
- createSettingsActivityIntent -> createSettingsIntent
- finishCurrentFragment -> finishCurrentSettings

Bug: b/356743945
2024-10-24 12:14:32 +01:00
Artem Samoilenko 2e23bb3f28 [Android] Add ToolbarPositionController
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/aed9e53b463e687a70b2f5db0ad5299bdde31168

[Anchor] Add ToolbarPositionController

This class is currently functionless except for a static util to check
if the device supports position customization.

Bug: 369133658
2024-10-24 12:14:32 +01:00
Artem Samoilenko 5e58b863da [Android] Introduce an empty ToolbarLongPressMenuHandler
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/4e75e680857aa2e0f2364e0977bba5eddfe048f0

[Anchor] Introduce an empty ToolbarLongPressMenuHandler.java

This CL provides the skeleton for the toolbar long-press menu functionality.

Change-Id: Icf06372970f9f19befe97d4dc82e0450a2ab356a
2024-10-24 12:14:32 +01:00
Artem Samoilenko 2a4f95de3a [Android] Move base.cached_flags to components.cached_flags
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/78b03df18d4625181de54bf6a7efa805c20b367d

Move base.cached_flags to components.cached_flags

We will need to depend on components/variations to support
fieldtrial_testing_config.json.

Since base can't use cached flags, and many clients of base won't
either, it makes more sense to put it in components.

Bug: 370797986
2024-10-24 12:14:32 +01:00
Artem Samoilenko 0162d55ab1 [Android] Fixes for new lint warnings
There were added new lint checks in C131. This commit fixes the following warnings:
warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
warning: [OperatorPrecedence] Use grouping parenthesis to make the operator precedence explicit
warning: [NarrowCalculation] This product of integers could overflow before being implicitly cast to a long
warning: [NarrowCalculation] This division will discard the fractional part of the result, despite being assigned to a float
warning: [ImmutableEnumChecker] enums should be immutable
warning: [Finalize] Do not override finalize
warning: [DoubleBraceInitialization] Prefer collection factory methods or builders to the double-brace initialization pattern
warning: [UnusedTypeParameter] This type parameter is unused and can be removed
warning: [UnnecessaryStringBuilder] Prefer string concatenation over explicitly using `StringBuilder#append`, since `+` reads better and has equivalent or better performance
2024-10-24 12:14:31 +01: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
Artem Samoilenko 0581535e3a [Android] Adjustment to extending the omnibox suggestions when drawing E2E
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/3c34eed14f29d850c9756a3f7e1ef4f7cb4da709

Extend the omnibox suggestions when drawing E2E

By default, the omnibox suggestions fit the height of the screen, without including system bars. When the edge-to-edge feature is enabled, the bottom navigation bar region can be drawn into, showing a gap with tab content underneath the omnibox suggestions list. This change allows for the edge-to-edge feature to communicate extra bottom padding to the omnibox suggestions dropdown to allow it to extend down and cover that bottom region, so the dropdown can draw "edge-to-edge" while keeping all of the suggestions fully visible and interactable.

Demo:
https://screencast.googleplex.com/cast/NjYyMDM3MTIxNzI4NTEyMHwzOTA4ZmJkZi00NQ

Demo (landscape):
https://screencast.googleplex.com/cast/NTk5NTYyMjA4NjczNzkyMHw5MzI3Y2ZlYi02YQ

Drawing E2E:
https://screenshot.googleplex.com/BUEWNAUMbguNCNY.png

Drawing E2E (bottom):
https://screenshot.googleplex.com/BuCyb2EzK95bsuC.png

Bug: b/325636004
2024-10-24 12:14:30 +01:00
Artem Samoilenko 649b6c9c94 [Android] Desktop windowing code moved from //chrome to //components
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a9b7e98a8269f90af6a0f7eb1795b9b96c32b90b

[DW] Move desktop windowing code from //chrome to //components

Move DesktopWindowStateProvider and AppHeaderState out of //chrome for
access by UI components, for eg. the bottom sheet.

Bug: 370117828
2024-10-24 12:14:30 +01:00
Artem Samoilenko 8604da3db1 [Android] Adopt ServiceLoaderUtil for CustomizationProviderDelegate
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2c57ce7d0331365cdf349f90451fb1379a5778ab

Adopt ServiceLoaderUtil for CustomizationProviderDelegate

Needs to wait for crrev.com/i/7702286 before landing.

Cq-Include-Trybots: luci.chrome.try:android-internal-binary-size
Bug: 40901855
2024-10-24 12:14:30 +01:00
Artem Samoilenko 658b071d05 [Android] Update a11y strings for toolbar TabSwitcherDrawable
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a382ec03169578982da4dbeb0960dc08eae005eb

[Data Sharing] Update a11y strings for toolbar TabSwitcherDrawable

Update the a11y strings for the toolbar view that hosts the
TabSwitcherDrawable icon.

Bug: 358464189
2024-10-24 12:14:28 +01:00
Artem Samoilenko 3c3b6aa5b2 Revert "[Android] Rename quickactionsearchwidget to shortcuts_widget"
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b031df85047dec61c0de4f81ad212bcb52088d9c

Revert "Rename quickactionsearchwidget to shortcuts_widget"

This reverts commit 553ab217c7738507c2f5f969c388d82fcae375ab.

Reason for revert:
Bug: b/368500276

No-Try: true

Original change's description:
> Rename quickactionsearchwidget to shortcuts_widget
>
> Change-Id: Ie8dbecd297925950e6a0a0da7c20e74b679383d3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5862267
> Reviewed-by: Sky Malice <skym@chromium.org>
> Commit-Queue: Gang Wu <gangwu@chromium.org>
> Reviewed-by: Wenyu Fu <wenyufu@chromium.org>
> Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#1356491}

Change-Id: Id32298409485d903c8594784d9b1ca6ccce4ed0c
2024-10-24 12:14:28 +01:00
Artem Samoilenko c103f04d50 [Android] TaskRunner postTask -> execute rename
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/db9277a704faa54da6392919398935051ec4a814

Make TaskRunner extend Java's Executor interface

This allows TaskRunners to be passed to Java APIs that expect and
Executor.

Bug: 326475719
2024-10-24 12:14:28 +01:00
Artem Samoilenko 120ba02dbe [Android] Adopt ServiceLoaderUtil for LanguageProfileDelegate
Upstream's logic in `AppLocaleUtils` for `getApplicationLocales` and `setApplicationLocales` is the same as it was in our patch, so we don't need it anymore.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/826aadf32e2ebec6a4086d97937f345ea5f3f912

Android: Adopt ServiceLoaderUtil for LanguageProfileDelegate

And upstreams & inlines the logic from LocaleManagerDelegate, which
existed only to work around Android T SDK not yet being available.

Also adds some @JniType annotations to LanguageBridge to simplify
changes there.

Bug: 40901855
2024-10-24 12:14:28 +01:00
Artem Samoilenko 617b75a432 [Android] Rename quickactionsearchwidget to shortcuts_widget
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/553ab217c7738507c2f5f969c388d82fcae375ab

Rename quickactionsearchwidget to shortcuts_widget

Change-Id: Ie8dbecd297925950e6a0a0da7c20e74b679383d3
2024-10-24 12:14:27 +01:00
Artem Samoilenko 21a40f55b4 [Android] Remove improved bookmarks feature flag and cleanup code
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/bec7878b1af9336b7d8ccf6926b6bf28ba658645

[bookmarks] Remove improved bookmarks feature flag and cleanup code

Bug: 326237392
2024-10-24 12:14:27 +01:00
Artem Samoilenko 8ebf032a33 [Android] Draw edge to edge on NTP
Chromium change:
https://github.com/brave/chromium/commit/102fef6d8356a30a51a72f139a2a0b97f0930bf2
[E2E] Draw edge to edge on NTP

Use SimpleEdgeToEdgePadAdjuster to pad the feed recycler view on NTP to allow the page draw to edge.

Preview:
https://screenshot.googleplex.com/95y7x9RMgfXUbJw
https://screenshot.googleplex.com/9nRKDBmVSZcJQFG

Dark:
https://screenshot.googleplex.com/5reX99dKKBFP2sQ
https://screenshot.googleplex.com/3pKbxh2Xmbcuram

Bug: 339025702
2024-10-24 12:14:27 +01:00
Artem Samoilenko 28b95d7267 [Android] Use ServiceLoaderUtil with AppHooks
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/21849f23ddc564a43b12c209f88cb96621c21040

Use ServiceLoaderUtil with AppHooks

Bug: 40901855
2024-10-24 12:14:27 +01:00
deeppandya 4dfd42923c Resolve vpn settings crash
Resolve format error
2024-10-23 20:42:59 -04:00
deeppandya 1fffd02fc9 Update automatic flag behaviour in server selection
Resolve format issue
2024-10-23 16:44:13 -04:00
deeppandya 9f37693bf8 Update condition for DayZero flag changes 2024-10-22 19:03:21 -04:00
Michael Herrmann 35694b827f Switch to Griffin flag DayZeroStudyAndroid and don't offer search widget when user already has it 2024-10-22 19:02:36 -04:00
Michael Herrmann 4d8aba523c Android fist run: Offer to install search widget 2024-10-22 19:02:31 -04:00
Michael Herrmann f49e3dfa38 Add entry for new feature to about flags 2024-10-22 19:01:25 -04:00
Michael Herrmann 3881f6ca26 Add missing import, C++ feature declaration, feature reference
Add missing #include
2024-10-22 18:59:58 -04:00
Michael Herrmann 6d056b73ad Force default browser prompt on first run on Android 2024-10-22 18:56:02 -04:00
Serg 5524ff2adf Adds a confirmation dialog on Exit 2024-10-22 13:00:45 -04:00
Brian Clifton 0d17590b3b Merge pull request #25310 from jagadeshjai/feature__toggle_for_show_undo_bar
[Android] Add an option to Show/Hide Undo bar when tab[s] closed.
2024-10-21 09:18:33 -07:00