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
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
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
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
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
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
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
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d1d408af2fc44106621601a3b35942fdbe2e8cb0
Move tracking NTP tab creation to NewTabPageCreationTracker
This CL moves the tracking NTP tab creation from NewTabPageUma to a new
file NewTabPageCreationTracker.
Also replace the UserAction to a enum histogram that tracks the
TabLaunchType.
Bug: 408364837
Chromium change:
https://chromium.googlesource.com/chromium/src/+/754d173c43ec2d98025a07946e5296828dc239cb
[Reload Button] Add support to observe tab changes
Observe tab changes in the ReloadButtonMediator instead of
updating it from ToolbarManager. Reload state will change based
on the current tab and its loading and crashed states.
Reworked how reload button received updates from NTP. Previously
any component could change reloading state by calling public API.
Now we enforce NTP reloading state with ObservableSupplier
and keeping reloading state management in a single place.
Bug: 402347979
* [ads] Fixes New Tab Takeover infobar is displayed after it was closed by (X) button
* [ads] Do not show infobar if should_support_confirmations_for_non_rewards is false
* [ads] Do not display NTT infobar when user joined rewards
* [ads] Do not display Android NTT infobar when rewards is enabled
* [ads] NTT infobar code health
* Android presubmit fix
* [ads] NTT infobar preference code health
* Adds exceptions for registerOnSharedPreferenceChangeListener and unregisterOnSharedPreferenceChangeListener calls
* Adds BraveActivity and BraveNewTabPageLayout to NullAway presubmit exceptions
* Move java classes into brave/browser for quick_search_engines
* Move serach_engines resources to brave/browser/search_engines
* Add translations files for search_engines android string
* Add dimens
Add a function to load favicons
* Add close menu id for quick search
* Add missing deps
* Move quick search engines changes to brave/browser/quick_search_engines
* Remove comments for BUILD.gn
* [cr137] [Android] Wait for native initialization when creating bottom strip
Chromium change:
https://chromium.googlesource.com/chromium/src/+/ea006a988d2a36db0eb25801e1c02e9c6e9f5b86
[Tab Group UI] Wait for native initialization when creating bottom strip
Wait for native initialization to complete before initializing the
bottom tab strip. Otherwise it will try to initialize pre-native and
crash. This appears to have regressed in M134/M135 likely due to some
lifecycle change for the BottomControlsCoordinator.
Fixed: 407305088
* Suppressed warning around ContextUtils.getAppSharedPreferences()
---------
Co-authored-by: Artem Samoilenko <artem@brave.com>
* 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
Fixesbrave/brave-browser#45541
There still many unfixed files:
android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveIncognitoTabSwitcherPane.java
android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabGroupUiCoordinator.java
android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/BraveTabSwitcherPaneBase.java
android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkManagerCoordinator.java
android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkManagerMediator.java
android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkToolbarCoordinator.java
android/java/org/chromium/chrome/browser/bookmarks/BraveBookmarkUtils.java
android/java/org/chromium/chrome/browser/customtabs/FullScreenCustomTabActivity.java
android/java/org/chromium/chrome/browser/customtabs/FullScreenCustomTabRootUiCoordinator.java
android/java/org/chromium/chrome/browser/firstrun/WelcomeOnboardingActivity.java
android/java/org/chromium/chrome/browser/settings/AppearancePreferences.java
android/java/org/chromium/chrome/browser/suggestions/tile/BraveMostVisitedTilesLayoutBase.java
android/java/org/chromium/chrome/browser/toolbar/BraveToolbarManager.java
android/java/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarCoordinator.java
android/java/org/chromium/chrome/browser/toolbar/bottom/BraveBottomControlsCoordinator.java
android/java/org/chromium/chrome/browser/toolbar/top/BraveToolbarLayoutImpl.java
android/java/org/chromium/chrome/browser/toolbar/top/BraveTopToolbarCoordinator.java
browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/BraveHubManagerImpl.java
browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/BraveHubToolbarView.java
They are not fixed because they are waiting for the upstream's counterparts to be fixed.
See exclusions at _CheckAndroidNullAwayAnnotatedClasses at src/PRESUBMIT.py
Related Chromium issue:
https://issues.chromium.org/issues/389129271
Add @NullMarked to all .java Files
Related Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/f8de93495c1d5e041d25dfd02d60f03ff1fabeed
[Android TRM] Remove R.id.tab_resumption_module_container_stub.
In crrev.com/c/5297855, the Tab Resumption Module was integrated into
the Magic Stack. Therefore it no longer needs the ViewStub
R.id.tab_resumption_module_container_stub as the top level layout, but
it still lingers. This CL deletes the now useless ViewStub.
Bug: 1515325
Change-Id: I358b64ef57c267629230578cf8dc5b28af3d7dfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5734353https://source.chromium.org/chromium/chromium/src/+/28cde898edae21f1b807d3e0e43d62701837ac7a
[Android TRM] Remove feature and most of the code.
This CL removes the Android Tab Resumption Module:
* Remove chrome/browser/tab_resumption.
* Remove flags and configs.
* Remove 5 UI strings: IDS_TAB_RESUMPTION_MODULE_*,
IDS_N_{MINUTES,HOURS}_AGO_NARROW.
* Remove resources.
Need to keep for metrics:
* tools/metrics/histograms/enums.xml entry.
Out of scope of this CL; TODO in follow-ups:
* NTP Customization features and tests involving the TRM (will remove in
follow-up).
* Keep IDS_TAB_RESUMPTION_MODULE_SEE_MORE "See more": This got reused by
Tab Switcher.
* Keep IDS_HOME_MODULES_TAB_RESUMPTION_TITLE "Continue with this tab" /
"Continue with these tabs": Used by Single Tab Module.
Unaffected:
* TRM still exists on Desktop and iOS. Tab data sync from Android
continue to work same as before.
Bug: 400479323, 400479745
Change-Id: I38cc101c361c761d38dff931b7ab6d15960836fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6408054
Span is removed from string resources
Related Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1e81dd10e119a703070d54f37110dfa106916c44
Add "new" label to the "Appearance" settings menu option.
This CL adds a "new" label to the "Appearance" settings menu option. The
label is only conditionally added using the same heuristics as are
currently used for the existing "Address bar" settings menu option.
This CL also makes "new" label support more generic so that it can power
both "Address bar" and "Appearance" settings menu options as well as any
new settings menu options in the future.
Design: http://shortn/_oxzSbwNuTe