Commit Graph
5278 Commits
Author SHA1 Message Date
AlexeyBarabash eb6f9efbd0 [cr148][Android] New arg signinButtonCoordinator at ToolbarLayout.initialize
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/45b9c87963d6a0800767ad546268d98415cb84c6

commit 45b9c87963d6a0800767ad546268d98415cb84c6
Author: Sophie Crowley <crowleso@google.com>
Date:   Fri Apr 10 09:59:05 2026 -0700

    [M148] [Signin][Android] Add SigninButton phone transitions

    Original change's description:
    > [Signin][Android] Add SigninButton phone transitions
    >
    > Adds a sliding transition for the NTP SigninButton, e.g. when switching
    > from non-NTP optional button to NTP Signin button, when switching from
    > incognito to button appearing in new non-incognito tab.
    >
    > Emulator screen-recording of transition example found in
    > https://crbug.com/478828569#comment28 and https://crbug.com/478828569#comment29
    >
    > Bug: 478828569
    > Change-Id: I19130b3a239fa51b7d476b818f4fb993bb0c420c
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7686413
    > Reviewed-by: Samar Chehade <samarchehade@google.com>
    > Commit-Queue: Sophie Crowley <crowleso@google.com>
    > Reviewed-by: Matthew Jones <mdjones@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#1611555}

    (cherry picked from commit a777d6df94430540ae583f34a478187ee0eb9c88)

    Bug: 500967903,478828569
    Change-Id: I19130b3a239fa51b7d476b818f4fb993bb0c420c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7748521
    Auto-Submit: Chrome Cherry Picker <chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com>
    Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
    Cr-Commit-Position: refs/branch-heads/7778@{#231}
    Cr-Branched-From: 77f495ee216d4c3cc784d33658bad4778c0680ee-refs/heads/main@{#1610480}
2026-04-27 12:01:02 +01:00
AlexeyBarabash 2ff26e6510 [cr148][Android] Changes at FeedActionDelegate.openSuggestionUrl
removed: onVisitComplete
added: surfaceId

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/69824f1f754963700f7b97e6be05a8a9f58a4eb0

commit 69824f1f754963700f7b97e6be05a8a9f58a4eb0
Author: Xi Han <hanxi@google.com>
Date:   Fri Apr 3 05:15:55 2026 -0700

    [Memory] Refactor NavigationRecorder.

    In this CL, we fix the issue that FeedStream can't be released from
    memory after NTP navigates. This is due to a NavigationRecorder being
    created when a NTP navigates, and it has a callback which keeps a
    reference FeedSurfaceRendererBridge to log the duration of users
    reading a card. The callback won't be called until a new Tab is
    created, i.e. leaving the current Tab, and #onHidden() is called.
    This leads to the FeedStream remain in memory after feeds is closed.

    In this CL, we add NavigationRecorder in C++ which calls the FeedApi
    directly to log the metrics. It no longer has a reference to the
    FeedSurfaceRendererBridge, and FeedStream can be released after the
    NTP navigates. FeedStream's memory foot print is cleaned up after
    leaving NTPs: http://shortn/_3DjIXJjzfY.

    This CL also fixes a visiting time logging issue. If the Tab never
    becomes foreground (mStartTimeMs == 0), we will log 0 for visit
    duration.

    Bug: 487641528, 493844946
    Change-Id: I34af7d2308d6ed070dff8ac52d11f17ae0977449
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7728181
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Dan Harrington <harringtond@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1609755}
2026-04-27 12:01:01 +01:00
AlexeyBarabash b9c2460005 [cr148][Android] Removed supportsFindInPage from BaseCustomTabRootUiCoordinator
Chromium change
https://source.chromium.org/chromium/chromium/src/+/2ee27ab283f1578d5f35ac79ee7fcf62d2a951fe

commit 2ee27ab283f1578d5f35ac79ee7fcf62d2a951fe
Author: Henrique Nakashima <hnakashima@chromium.org>
Date:   Thu Apr 2 13:17:48 2026 -0700

    [Android] Null-annotate RootUiCoordinator (part 11)

    Fix 1 NullAway error due to:
    - mFindToolbarManager

    Clean up the always true supportFindInPage() to simplify nullability.

    Down to 48 errors.

    Change-Id: Iee0789070cd9904b08f827e481ce9ec3886bdb40
    Bug: 485252552
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7722900
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1609461}
2026-04-27 12:01:01 +01:00
AlexeyBarabash 7a2e7fb904 [cr148][Android] Adjusted tabSupplier at HubManagerImpl.ctor
Now it is NullableObservableSupplier, missed old change

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/416a61c418c152a7a7ae568d89302e5ecb6e4a3d

commit 416a61c418c152a7a7ae568d89302e5ecb6e4a3d
Author: Andrew Grieve <agrieve@chromium.org>
Date:   Tue Dec 2 14:13:59 2025 -0800

    Android: Split ObservableSupplier into Nullable / Monotonic / NonNull variants

    The goal is to use proper @Nullable annotations with
    ObservableSuppliers.

    To achieve this, we use interfaces that define nullness:
     * (Settable)NullableObservableSupplier
     * (Settable)ObservableSupplier <-- monotonic
     * (Settable)NonNullObservableSupplier

    And we have ObservableSupplierImpl implement all of them.

    In order to make this migration manageable, I've marked the interfaces
    as @NullUnmarked, and will fix annotations in batches until they
    can be marked @NullMarked.

    This CL includes a batch in order to test out the new interfaces (and
    because many were necessary to make the change).

    Monotonic suppliers are by far the most common afaict, so that's why
    the non-prefixed ObservableSupplier is the monotonic one (that, and
    because "Monotonic" is a mouthful).

    One implication of this approach is that we'll never have:
       ObservableSupplier<@Nullable Foo>
    We'd have instead:
       NullableObservableSupplier<Foo>

    Having the nullness in the interface rather than in the generic
    allows for defining toNonNull() only on monotonic suppliers, and
    simplifies the implementation.

    Bug: 455874046
    Change-Id: Id48e235b9ff16a5b21a9c1199863150d17c22736
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7206746
    Commit-Queue: Andrew Grieve <agrieve@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Owners-Override: Andrew Grieve <agrieve@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1553094}
2026-04-27 12:00:59 +01:00
AlexeyBarabash 99ebb5a603 [cr148][Android] Removed preferences we don't need
BraveMainSettingsFragmentTest#testPreferenceCount caught
2 more prefs we don't want:
- settings_promo_card
- manage_sync

The change below is probably responsible for exposing them

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1ea4b48ea68982cd81a4a3a6f8bad6e8839789bd

commit 1ea4b48ea68982cd81a4a3a6f8bad6e8839789bd
Author: Josef Raska <josefraska@google.com>
Date:   Wed Mar 18 07:41:06 2026 -0700

    [HoT][Autofill] - Launch HoT screen in Settings

    - Launching an empty screen for now.
    - Video from the test: https://screencast.googleplex.com/cast/NDU3ODE5MTk5MjY4NDU0NHxhNGViM2JiYy1kOQ
    - More tests and user action reporting comes in crrev.com/c/7653458

    Bug: 482994356
    Change-Id: Ib3ae426846faaff85e2fd69da6d04078d7a54b6f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7653140
    Reviewed-by: Julia Sobiech <jsobiech@google.com>
    Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
    Reviewed-by: Abe Boujane <boujane@google.com>
    Reviewed-by: Timofey Chudakov <tchudakov@google.com>
    Commit-Queue: Josef Raska <josefraska@google.com>
    Cr-Commit-Position: refs/heads/main@{#1601279}
2026-04-27 12:00:59 +01:00
AlexeyBarabash 949d29fb70 [cr148][Android] Chromium refactored NewTabPageCoordinator
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/f85df3955cb3bcc7d90cf0af71458e5cad9d45cc

1. NewTabPage.initializeMainView renamed to
   initializeFeedSurfaceProvider
2. Some code from NewTabPage.initializeMainView
   was moved to c-tor

commit f85df3955cb3bcc7d90cf0af71458e5cad9d45cc
Author: Xi Han <hanxi@google.com>
Date:   Mon Mar 30 09:06:59 2026 -0700

    [NtpRefactor] Polish NewTabPageCoordinator.

    1. Move several parameters passed in NewTabPageCoordinator#initialize()
       to the constructor. This allows to set multiple member variables as
       final variables.
    2. Add missing @Nullable to member variables and add null check in
       code for them. This includes: mSearchBoxCoorinator, mUiConfig etc.
    3. Re-arange the sequencings in #destroy(): the last created object is
       destroyed first.

    Bug: 487641528
    Change-Id: I935e3aee111a6fd816a228f004f7b1d9663d03d6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7709015
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1607137}
2026-04-27 12:00:59 +01:00
AlexeyBarabash c6fa7e3e00 [cr148][Android] MultiWindowUtils changes
- isOpenInOtherWindowSupported removed;
- isLinkNavigationToNewWindowSupported added;
- isLinkNavigationToIncognitoWindowSupported added.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8ebbccb8137c4b44999c92edfb971e821d9365ba

commit 8ebbccb8137c4b44999c92edfb971e821d9365ba
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date:   Mon Mar 30 11:44:27 2026 -0700

    Update conditions for "Move to other window" / "Move to new window"
    visibility on context menus for link navigation

    The CL creates / updates utility methods in MultiWindowUtils to
    determine when these options are shown on a link context menu per latest
    recommendations:
    - Open in new window
    - Open in Incognito window
    - Open in other window

    The updates in this CL ensure that either "Open in new window" or "Open
    in other window" (not both) are visible on the menu. Both options will
    invoke the same codepath currently, this will be updated in fast-follow
    CLs.

    Bug: 475571336
    Change-Id: I33a597703e634a7d5cd2d6b66c4c2ca9254374ef
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7680970
    Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
    Reviewed-by: Sirisha Kavuluru <skavuluru@google.com>
    Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
    Reviewed-by: Shu Yang <shuyng@google.com>
    Cr-Commit-Position: refs/heads/main@{#1607263}
2026-04-27 12:00:58 +01:00
AlexeyBarabash e87cb4745b [cr148][Android] new_tab_page_layout.xml updated
Chromium changes:
https://source.chromium.org/chromium/chromium/src/+/6edb0dee6f14aeeafbd19b9140c94f6be4a83fd6

commit 6edb0dee6f14aeeafbd19b9140c94f6be4a83fd6
Author: Xi Han <hanxi@google.com>
Date:   Fri Mar 27 11:35:29 2026 -0700

    [Composeplate] Clean up the composeplate v1 layout [1/2]

    In this CL, we remove the V1 layout composeplate_view_layout.xml, and
    clean up ViewBinder and Properties.

    Bug: 421944848, 487641528
    Change-Id: Ia9d21a2069ce5e7ff9d7c3d622d8893973950774
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7708412
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1606375}

https://source.chromium.org/chromium/chromium/src/+/8ddf6bb4ecfeed84c878714b5990b8d02ef21193

commit 8ddf6bb4ecfeed84c878714b5990b8d02ef21193
Author: Xi Han <hanxi@google.com>
Date:   Fri Mar 27 11:35:44 2026 -0700

    [Composeplate] Clean up the composeplate v1 layout [2/2]

    Rename composeplate_view_layout_v2.xml to composeplate_view_layout.xml.

    Bug: 421944848, 487641528
    Bypass-Check-License: the layout is renamed from composeplate_view_layout_v2.xml.
    Change-Id: I09c6ebd91a992d2d7c343074ef64e4afe1626ae9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7708273
    Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1606376}
2026-04-27 12:00:56 +01:00
AlexeyBarabash 727a295757 [cr148][Android] MultiInstanceOrchestratorImpl.moveTabsToWindowByIdChecked signature changed
New arg bringToFront

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/15b60a7f51080d75b18d37f6bbf83a7a39151c15

commit 15b60a7f51080d75b18d37f6bbf83a7a39151c15
Author: Lijin Shen <lazzzis@google.com>
Date:   Fri Mar 27 14:06:30 2026 -0700

    tabs.move on Android: allow moving tabs in the background

    Fixes a behavior discrepancy between Android and Desktop when moving
    tabs between windows via the extension API (e.g., chrome.tabs.move).
    Currently on Android, the destination window is always brought to the
    front

    Added a bringToFront boolean parameter to conditionally controls the
    call to ApiCompatibilityUtils.moveTaskToFront(). This defaults to true
    such that this CL won't bring any behavior change. This sets false in
    TabModelSelectorImpl.java such that tab.move won't activate the
    destination window.

    Bug: 495516043
    Change-Id: I60e7b42794c240023669afcf3cd15f8031c16ded
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7685707
    Reviewed-by: Linyu He <linyuh@google.com>
    Reviewed-by: Aishwarya Rajesh <aishwaryarj@google.com>
    Commit-Queue: Lijin Shen <lazzzis@google.com>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1606471}
2026-04-27 12:00:56 +01:00
AlexeyBarabash 0bad49cb8e [cr148][Android] Conflict on BraveTabCollectionTabModelImplBase.isTabModelRestored()
Upstream moved isTabModelRestored() into the TabGroupModelFilter
interface, which TabModel now extends, making the previously
private method in BraveTabCollectionTabModelImplBase conflict
with the now-public interface method.

Error message:
../../brave/android/java/org/chromium/chrome/browser/tabmodel/BraveTabCollectionTabModelImplBase.java:61: error: isTabModelRestored() in BraveTabCollectionTabModelImplBase cannot implement isTabModelRestored() in TabGroupModelFilter
    private boolean isTabModelRestored() {
                    ^
  attempting to assign weaker access privileges; was public

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/401697a07af594e4420ef1f4998d13f43533874f

commit 401697a07af594e4420ef1f4998d13f43533874f
Author: Jingping Sun <jings@microsoft.com>
Date:   Fri Mar 27 10:23:32 2026 -0700

    [TabModel] Make TabModel extend TabGroupModelFilter

    As part of combining these interfaces this CL is the first step.

    * IncognitoTabGroupModelFilterImpl is inlined onto
      IncognitoTabModelImpl.
    * StubTabGroupModelFilterImpl is no longer required.
    * EmptyTabModel now has stub methods for TabGroupModelFilter.

    BYPASS_LARGE_CHANGE_WARNING: all stub methods

    Bug: 463685717, 476144237, 493519189
    Change-Id: Ia27c3a355f92da60cdb3c1e8ac9fabe892b49bc0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7684470
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Commit-Queue: Jingping Sun <jings@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#1606333}
2026-04-27 12:00:56 +01:00
AlexeyBarabash ad6cedaf22 [cr148][Android] Changes at ShareDelegateImpl.ctor
New args:
signinAndHistorySyncActivityLauncher;
activityResultTracker;
modalDialogManagerSupplier;
snackbarManager.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/0af385e0296806bb278d2c4b73e7e652d310def5

commit 0af385e0296806bb278d2c4b73e7e652d310def5
Author: quacksort <quacksort@google.com>
Date:   Tue Mar 24 06:59:26 2026 -0700

    [Signin][Android] Migrate send tab to self sign-in to activity-less flow

    This is part of the effort to reduce reliance on
    SigninAndHistorySyncActivity by sign-in entry points.
    go/activityless-signin

    The new flow uses BottomSheetSigninAndHistorySyncCoordinator to handle
    the sign-in process, avoiding the need to launch a separate activity.

    Bug: 478814334
    Change-Id: I0448875de416af5e3e48d1ac5f2eeb3d18e6efcc
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7647173
    Reviewed-by: Anton Goncharenko <agonch@google.com>
    Commit-Queue: Lucia Giorgi <quacksort@google.com>
    Cr-Commit-Position: refs/heads/main@{#1604087}
2026-04-27 12:00:55 +01:00
AlexeyBarabash 9ad9019b60 [cr148][Android] Move MultiInstanceManager#openUrlInOtherWindow() to
MultiInstanceOrchestrator

Removed multiInstanceManager from:
- NewTabPage.ctor;
- LocationBarCoordinator.ctor;
- LocationBarMediator.ctor;
- ToolbarManager.ctor.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/8d0821cb4bcc840ed271bbc209298da535523a62

commit 8d0821cb4bcc840ed271bbc209298da535523a62
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date:   Wed Mar 25 10:58:50 2026 -0700

    [MIR] Move MultiInstanceManager#openUrlInOtherWindow() to
    MultiInstanceOrchestrator

    This will make the implementation accessible from
    non-ChromeTabbedActivity contexts.

    Also remove now unused MultiInstanceManager dependency from impacted
    classes.

    Bug: 494034921
    Change-Id: I9eb1b871476a82a49a6e7f294e542d58a913c3fe
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7695235
    Reviewed-by: Sirisha Kavuluru <skavuluru@google.com>
    Reviewed-by: Ted Choc <tedchoc@chromium.org>
    Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
    Cr-Commit-Position: refs/heads/main@{#1604957}
2026-04-27 12:00:55 +01:00
AlexeyBarabash 922b41d912 [cr148][Android] Removed tabContentManagerSupplier from NewTabPage.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/637ab3d33243fac8b3ee914db8357adb2fd79464

commit 637ab3d33243fac8b3ee914db8357adb2fd79464
Author: Xi Han <hanxi@google.com>
Date:   Wed Mar 25 09:04:27 2026 -0700

    [MagicStack] Clean up feature MagicStackAndroid.

    In this CL, we clean up all remaining code for the feature flag of
    magic stack. The feature has been launched long time ago.

    Bug: 41485537, 487641528, 493844946
    Change-Id: Ifc8d51793b942974ea0366656c0d4878b9578857
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7697213
    Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
    Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1604869}
2026-04-27 12:00:55 +01:00
AlexeyBarabash f2fb800992 [cr148][Android] Cleanup MultiWindowUtils#getInstanceCountWithFallback()
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a8ce63dc2a3db3dbe93ef44747e21fae654f35ec

commit a8ce63dc2a3db3dbe93ef44747e21fae654f35ec
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date:   Thu Mar 26 13:51:59 2026 -0700

    [RWM] Cleanup MultiWindowUtils#getInstanceCountWithFallback()

    Rename the method to getInstanceCount() and use this to replace current
    callsites of getIncognitoInstanceCount() so that the latter can be
    removed.

    Bug: 461553972
    Change-Id: I0eb9cc5c48394312310bce90c2a7e1970249d816
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7700123
    Reviewed-by: Sirisha Kavuluru <skavuluru@google.com>
    Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
    Cr-Commit-Position: refs/heads/main@{#1605765}
2026-04-27 12:00:55 +01:00
AlexeyBarabash 22660beed3 [cr148][Android] Replace ConfirmationDialogHelper with ActionConfirmationDialog
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/f3ba4ddfcd5f49cded342e0fe965cb2dee67f5bc

commit f3ba4ddfcd5f49cded342e0fe965cb2dee67f5bc
Author: Piotr Kotynia <piotrkotynia@google.com>
Date:   Wed Mar 25 06:50:24 2026 -0700

    [Android] Replace ConfirmationDialogHelper with ActionConfirmationDialog

    This CL deprecates the ConfirmationDialogHelper and replaces its usage
    inside the keyboard accessory with the generic ActionConfirmationDialog
    from browser_ui.

    End-to-end integration testing for the deletion dialog flow inside the
    keyboard accessory will be added in a follow-up CL.

    Bug: 440257087
    Change-Id: I3844d662d5295eb670792384f4ea403a675661d3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7666141
    Reviewed-by: Friedrich Hauser <friedrichh@chromium.org>
    Commit-Queue: Piotr Kotynia <piotrkotynia@google.com>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Auto-Submit: Piotr Kotynia <piotrkotynia@google.com>
    Cr-Commit-Position: refs/heads/main@{#1604763}
2026-04-27 12:00:55 +01:00
AlexeyBarabash cfa0bd182f [cr148][Android] Split NewTabPageLayout into NewTabPageCoordinator and layout
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/040e46a7c7697d0eb32e58b30a39e9822d045d81

commit 040e46a7c7697d0eb32e58b30a39e9822d045d81
Author: Xi Han <hanxi@google.com>
Date:   Wed Mar 11 18:33:45 2026 -0700

    [NtpRefactor] Split NewTabPageLayout into NewTabPageCoordinator and
    layout.

    This is a refactor CL without any behavior changes. In this CL:
    1. Split major logic from  NewTabPageLayout to NewTabPageCoordinator,
       only Layout implementations remains in the NewTabPageLayout;
    2. To preserve the renaming history, temporarily renaming
       NewTabPageLayout to NtpLayout. We will rename back in follow up CL
       https://crrev.com/c/7658503.
    Design doc: go/ntp-mvc-refactor.

    Bug: 487641528
    Bypass-Check-License: NewTabPageCoordinator is a renamed from NewTabPageLayout.
    Change-Id: Ief8fd9b048696a875ccd8167421d88ad2e667f04
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7658403
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1598132}
2026-04-27 12:00:51 +01:00
AlexeyBarabash d049a9eb78 [cr148][Android] Removed search_resumption_module_layout
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/4830d983661a2b06590463a1d2dd8e10e8aa80b2

commit 4830d983661a2b06590463a1d2dd8e10e8aa80b2
Author: Xi Han <hanxi@google.com>
Date:   Mon Mar 16 11:41:07 2026 -0700

    [SearchResumption] Clean up search resumption module.

    In this CL:
    1. Remove the entire chrome/browser/search_resumption dir;
    2. Clean up feature flag SearchResumptionModuleAndroid;
    3. Remove the entry point from NewTabPage and new_tab_page_layout.xml.
    4. Clean up strings and histograms.

    Bug: 40227734
    Change-Id: Ic3881a9e536ee09ad5f64efee5a0e734b9090e7f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7664722
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Nicolas Dossou-Gbété <dgn@chromium.org>
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1600031}
2026-04-27 12:00:50 +01:00
AlexeyBarabash d153508e83 [cr148][Android] MultiWindowUtils.canEnterMultiWindowMode is now static
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/dc47bc94e21a021492a10bb6ada51f6903f9faa5

commit dc47bc94e21a021492a10bb6ada51f6903f9faa5
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date:   Thu Mar 19 16:55:50 2026 -0700

    [MIR] Cleanup MultiWindowUtils#canEnterMultiWindowMode()

    1. Make this method static.
    2. Cleanup methods aospMultiWindowModeSupported() and
    customMultiWindowModeSupported() and move the implementations inline
    (since these contain trivial OS/OEM checks).
    3. Remove MultiWindowModeStateDispatcher#canEnterMultiWindowMode() and
    replace callsites with the static method.
    4. Remove MultiWindowUtils#instanceSwitcherEnabled() that performs a
    trivial OS check and is redundant at callsites.
    5. Remove superfluous code in TabbedAppMenuPropertiesDelegate.

    Bug: 493261092
    Change-Id: Ib15040a694642549b51040db68329cad64545777
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7668482
    Reviewed-by: Sirisha Kavuluru <skavuluru@google.com>
    Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
    Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
    Cr-Commit-Position: refs/heads/main@{#1602333}
2026-04-27 12:00:50 +01:00
AlexeyBarabash b4a2a3a144 [cr148][Android] Removed moveTabsToWindowByIdChecked from MultiInstanceManagerApi31.ctor
Used MultiInstanceOrchestratorImpl override.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1eff3e2dfcb821e6a6fbccae543632bb5ebbce98

commit 1eff3e2dfcb821e6a6fbccae543632bb5ebbce98
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date:   Wed Mar 18 15:32:23 2026 -0700

    [MIR] Create MultiInstanceOrchestrator as a singleton to hold business
    logic that is not scoped to a specific ChromeTabbedActivity

    This CL attempts to simplify accessing multi-instance business logic
    from callers that do not have access to a MultiInstanceManager instance
    (for example, CCT context based feature implementations), by introducing
    a MultiInstanceOrchestrator singleton implementation.

    The CL only moves method moveTabsToWindowByIdChecked() as an initial
    example for usage of this class. Other MultiInstanceManager API methods
    that can be extracted into the singleton will be moved in followup CLs.

    Bug: 491893859
    Change-Id: I459a5ed79b058b548f42fd3c85f0b9382e756803
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7659642
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
    Cr-Commit-Position: refs/heads/main@{#1601584}
2026-04-27 12:00:50 +01:00
AlexeyBarabash 1896fa48aa [cr148][Android] Removed tabReparentingDelegate from MultiInstanceManagerApi31.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/1eff3e2dfcb821e6a6fbccae543632bb5ebbce98

commit 1eff3e2dfcb821e6a6fbccae543632bb5ebbce98
Author: Aishwarya Rajesh <aishwaryarj@google.com>
Date:   Wed Mar 18 15:32:23 2026 -0700

    [MIR] Create MultiInstanceOrchestrator as a singleton to hold business
    logic that is not scoped to a specific ChromeTabbedActivity

    This CL attempts to simplify accessing multi-instance business logic
    from callers that do not have access to a MultiInstanceManager instance
    (for example, CCT context based feature implementations), by introducing
    a MultiInstanceOrchestrator singleton implementation.

    The CL only moves method moveTabsToWindowByIdChecked() as an initial
    example for usage of this class. Other MultiInstanceManager API methods
    that can be extracted into the singleton will be moved in followup CLs.

    Bug: 491893859
    Change-Id: I459a5ed79b058b548f42fd3c85f0b9382e756803
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7659642
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Aishwarya Rajesh <aishwaryarj@google.com>
    Cr-Commit-Position: refs/heads/main@{#1601584}
2026-04-27 12:00:50 +01:00
AlexeyBarabash ba30474cf5 [cr148][Android] New arg hubManagerSupplier at TabbedAppMenuPropertiesDelegate.ctor
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/729996f4d16b4a3859c0c162623b7e1b1b1aea43

commit 729996f4d16b4a3859c0c162623b7e1b1b1aea43
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Mon Mar 16 07:51:46 2026 -0700

    [Hub] Remove select_tabs from the overflow menu on non-tabs panes

    This also sets us up to support other "pane specific" customizations in
    the future.

    Fixed: 493182478
    Change-Id: Iab2f3b072ae5fffa3c55c63d8c50afe35f7285a1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7667560
    Reviewed-by: Madhav Pruthi <madhavpruthi@google.com>
    Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Madhav Pruthi <madhavpruthi@google.com>
    Reviewed-by: Dan Polanco <polardz@google.com>
    Cr-Commit-Position: refs/heads/main@{#1599889}
2026-04-27 12:00:49 +01:00
AlexeyBarabash 055edd76d8 [cr148][Android] Changes around BottomBarHostManager
New arg bottomBarHostManager at:
- HubManagerImpl.ctor
- TabbedRootUiCoordinator.ctor
- ToolbarManager.ctor

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9be4e7a3e1f68c9a7405c62e06cbe8b4ed8832d5

commit 9be4e7a3e1f68c9a7405c62e06cbe8b4ed8832d5
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Tue Mar 17 16:49:31 2026 -0700

    [BottomBar] handle view ownership transfer

    Bug: 491509787
    Change-Id: Ia8baf8095c55fe9580d718bb8806deab9fd0f5e1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7667562
    Reviewed-by: Madhav Pruthi <madhavpruthi@google.com>
    Reviewed-by: Dan Polanco <polardz@google.com>
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1600877}
2026-04-27 12:00:49 +01:00
AlexeyBarabash ca04e711f9 [cr148][Android] - kAutofillEnableLoyaltyCardsFilling removed
Removed PREF_LOYALTY_CARDS from preferences.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9d45f2f1f7f2f4e07a9ebf93be1873fd2bc34109

commit 9d45f2f1f7f2f4e07a9ebf93be1873fd2bc34109
Author: Norge Vizcay <vizcay@google.com>
Date:   Fri Mar 13 07:52:52 2026 -0700

    Remove kAutofillEnableLoyaltyCardsFilling feature flag

    The AutofillEnableLoyaltyCardsFilling feature has been launched.
    This CL removes the feature flag and all related code/tests that
    were conditionally enabled by it. All loyalty card filling
    functionality is now enabled by default.

    Bug: 395831853
    Test: CQ passes
    Change-Id: I1a686fcdf1724138ade660229b54760d563f4d66
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7661784
    Reviewed-by: Christoph Schwering <schwering@google.com>
    Reviewed-by: Florian Leimgruber <fleimgruber@google.com>
    Commit-Queue: Norge Vizcay <vizcay@google.com>
    Cr-Commit-Position: refs/heads/main@{#1599049}
2026-04-27 12:00:49 +01:00
AlexeyBarabash 0278f05dc6 [cr148][Android] Delete TinkerTank
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/4783f6f061ceee0788a1d52ab273510ffa42f19a

commit 4783f6f061ceee0788a1d52ab273510ffa42f19a
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Mon Mar 16 10:45:32 2026 -0700

    Delete TinkerTank

    - Delegate is kept until downstream use is cleaned up.

    Bug: None
    Change-Id: I32692bdf3e76a8ba4645555dd1a3ff5ac1bb42a6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7669831
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org>
    Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
    Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1600003}
2026-04-27 12:00:48 +01:00
AlexeyBarabash 662762c21d [cr148][Android] BottomControlsMediator/Coordinator gained layerType param
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/d0dca8d3d103b066d551f6713a3ab53b1072ee51

commit d0dca8d3d103b066d551f6713a3ab53b1072ee51
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Fri Mar 13 10:44:15 2026 -0700

    [BottomControls] Make bottom controls more generic

    * Simplify back press logic.
    * Extract LayerType so the component can be reused for multiple layers.
    * Misc. cleanup and reorganization.

    Bug: 492262214
    Change-Id: Ic35a7613f950d73470471b4b5c8b62497c535cee
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7665618
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Reviewed-by: Dan Polanco <polardz@google.com>
    Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1599163}
2026-04-27 12:00:47 +01:00
AlexeyBarabash 332f7c3281 [cr148][Android] bottom_controls_stub renamed to tab_group_ui_container_stub
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7f45d5ea69f24f70aa752408de0b2918d09b09c5

commit 7f45d5ea69f24f70aa752408de0b2918d09b09c5
Author: Calder Kitagawa <ckitagawa@chromium.org>
Date:   Fri Mar 13 10:44:30 2026 -0700

    [BottomControls] More renames in preparation for bottom app bar

    Bug: 492262214
    Change-Id: I6cd721bdb6b403d5ebf608d8509bb30e074ed69d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7666737
    Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
    Auto-Submit: Calder Kitagawa <ckitagawa@chromium.org>
    Reviewed-by: Sky Malice <skym@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1599164}
2026-04-27 12:00:47 +01:00
AlexeyBarabash 6770144ba6 [cr148][Android] TopToolbarCoordinator.ctor gained 7 new parameters
Seven new parameters added to TopToolbarCoordinator constructor after
MonotonicObservableSupplier<Profile>:
- SigninAndHistorySyncActivityLauncher
- WindowAndroid
- ActivityResultTracker
- DeviceLockActivityLauncher
- BottomSheetController
- ModalDialogManager
- SnackbarManager

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c0e37322747db4f16956a53ff936c85905593c3b

commit c0e37322747db4f16956a53ff936c85905593c3b
Author: Sophie Crowley <crowleso@google.com>
Date:   Wed Mar 11 10:30:11 2026 -0700

    [Signin][Android] Add piping for Signin button onclick functionality

    This will be immediately followed by its child CL
    https://crrev.com/c/7604273 which uses all of these dependencies in
    adding Seamless Signin + settings onclick functionality for this Signin
    button. Split CL for ease of review. Adapted from
    IdentityDiscController.java

    Bug: 478828569
    Change-Id: I600617b391ac061000998b1820ba573a57079e86
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7600378
    Commit-Queue: Sophie Crowley <crowleso@google.com>
    Reviewed-by: Liza Bipin <mlbipin@google.com>
    Cr-Commit-Position: refs/heads/main@{#1597857}
2026-04-27 12:00:47 +01:00
AlexeyBarabash d8a111fc39 [cr148][Android] ToolbarManager.ctor gained ActivityResultTracker and DeviceLockActivityLauncher
Two new parameters added to ToolbarManager constructor between
WindowAndroid and OneshotSupplier<ChromeAndroidTask>:
- ActivityResultTracker
- DeviceLockActivityLauncher

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/c0e37322747db4f16956a53ff936c85905593c3b

commit c0e37322747db4f16956a53ff936c85905593c3b
Author: Sophie Crowley <crowleso@google.com>
Date:   Wed Mar 11 10:30:11 2026 -0700

    [Signin][Android] Add piping for Signin button onclick functionality

    This will be immediately followed by its child CL
    https://crrev.com/c/7604273 which uses all of these dependencies in
    adding Seamless Signin + settings onclick functionality for this Signin
    button. Split CL for ease of review. Adapted from
    IdentityDiscController.java

    Bug: 478828569
    Change-Id: I600617b391ac061000998b1820ba573a57079e86
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7600378
    Commit-Queue: Sophie Crowley <crowleso@google.com>
    Reviewed-by: Liza Bipin <mlbipin@google.com>
    Cr-Commit-Position: refs/heads/main@{#1597857}
2026-04-27 12:00:47 +01:00
AlexeyBarabash 0da6443d28 [cr148][Android] SnapScrollHelperImpl.ctor takes NewTabPageCoordinator now
SnapScrollHelperImpl constructor changed to accept NewTabPageCoordinator
instead of NewTabPageLayout. Added mNewTabPageCoordinator shadow field to
BraveNewTabPage and create it in initializeMainView after inflating the
layout.

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/040e46a7c7697d0eb32e58b30a39e9822d045d81

commit 040e46a7c7697d0eb32e58b30a39e9822d045d81
Author: Xi Han <hanxi@google.com>
Date:   Wed Mar 11 18:33:45 2026 -0700

    [NtpRefactor] Split NewTabPageLayout into NewTabPageCoordinator and
    layout.

    This is a refactor CL without any behavior changes. In this CL:
    1. Split major logic from  NewTabPageLayout to NewTabPageCoordinator,
       only Layout implementations remains in the NewTabPageLayout;
    2. To preserve the renaming history, temporarily renaming
       NewTabPageLayout to NtpLayout. We will rename back in follow up CL
       https://crrev.com/c/7658503.
    Design doc: go/ntp-mvc-refactor.

    Bug: 487641528
    Bypass-Check-License: NewTabPageCoordinator is a renamed from NewTabPageLayout.
    Change-Id: Ief8fd9b048696a875ccd8167421d88ad2e667f04
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7658403
    Commit-Queue: Xi Han <hanxi@chromium.org>
    Reviewed-by: Xinyi Ji <xinyiji@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1598132}
2026-04-27 12:00:46 +01:00
AlexeyBarabash 39621e4055 [cr148][Android] Move SigninManagerImpl to signin.services target
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/737d3e35abb1641430e6aed3f1b9d7bac36fd9c1

commit 737d3e35abb1641430e6aed3f1b9d7bac36fd9c1
Author: Liza Bipin <mlbipin@google.com>
Date:   Thu Mar 12 03:02:24 2026 -0700

    [Signin][Android] Move SigninManagerImpl to signin.services target

    Fixed: 40163288
    Bypass-Check-License: Files were moved and so contain an older licence date.
    Change-Id: I99d2710096ce9e918995038d9834038adba28048
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7633764
    Reviewed-by: Menghan Yang <myuu@google.com>
    Commit-Queue: Liza Bipin <mlbipin@google.com>
    Cr-Commit-Position: refs/heads/main@{#1598309}
2026-04-27 12:00:46 +01:00
AlexeyBarabash 5794409827 [cr148][Android] FragmentDependencyProvider.ctor windowAndroidSupplierarg changed
From `MonotonicObservableSupplier` to `OneshotSupplier`

Chromim change:
https://source.chromium.org/chromium/chromium/src/+/1886db4b40ccf9dfad5270be7861fefbb44c5ed3

commit 1886db4b40ccf9dfad5270be7861fefbb44c5ed3
Author: Anton Goncharenko <agonch@google.com>
Date:   Tue Mar 10 17:49:16 2026 -0700

    [Signin][Android] SafetyHub: Wait for UI dependencies before initializing sign-in coordinator.

    For consistency with other fragments' provided dependencies, pass
    Suppliers to SafetyHubModuleDelegateImpl rather than assuming the
    Suppliers have already been initialized. Able to repro a
    NullPointerException (WindowAndroid not being initialized) during
    Activity recreation when killing Chrome during the "add new account"
    sign-in flow (see repro steps in crbug.com/479179162).

    Bug: 479179162
    Change-Id: I8a37a6a532cf5d4650849ec86151e1ee9c9ee0f2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7642808
    Reviewed-by: Menghan Yang <myuu@google.com>
    Commit-Queue: Anton Goncharenko <agonch@google.com>
    Reviewed-by: Zaina Al-Mashni <zalmashni@google.com>
    Reviewed-by: Jinsuk Kim <jinsukkim@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1597438}
2026-04-27 12:00:45 +01:00
AlexeyBarabash 2a0d8de9ef Android settings containment (#35636)
* [Android] Fixed containment at settings

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

* Fixed containment for the Homepage settings screen
* Fixed containment for WebRTC policy screen
* Fixed containment at Languages settings; modified SettingsUtils.getVisiblePreferences
* Fixed  privacy item
* Fixed containment for NFT discovery learn more preference
Replaced TextMessagePreference (BackgroundStyle.NONE, transparent) with
ChromeBasePreference so the NFT description groups with the Enable NFT
discovery toggle in one card. Follows the same camera OS-warning pattern:
ForegroundColorSpan for the link color, setOnPreferenceClickListener for
the tap action, matching Chromium upstream conventions.
* Moved NFT discovery block before Reset wallet preference
Enable NFT discovery toggle and its description now appear above
"Reset and clear wallet data", matching the intended UX order.
* Fixed containment for Brave Firewall + VPN settings
Set initial visibility of server_change_location in onCreatePreferences
to avoid animated removal artifact. Call notifyPreferencesUpdated() after
dynamic visibility changes in updateSummaries so containment styles stay
in sync with adapter positions.
* Fixed containment for New Tab Page settings learn more
Replaced ClickableSpansTextMessagePreference with ChromeBasePreference
for the sponsored images learn more link so it groups into the
Background Images card with the toggles above it.
* Removed On/Off captions from New Tab Page switch prefs
2026-04-25 18:49:09 +03:00
AlexeyBarabash 603447ffe7 Android navbar dynamic color when addressbar bottom (#35877)
* Fixed navigation bar color when address bar is at the bottom

Resolves https://github.com/brave/brave-browser/issues/54934
2026-04-24 22:32:50 +03:00
Serg bd61cf9c46 [Android] Hide Survey Panelist setting for Brave Origin users (#35800)
The Survey Panelist toggle and its "Learn more" row remained visible
under Settings -> Brave Shields & privacy for users with an active
Brave Origin subscription.

Extend the existing BRAVE_NTP_BRANDED_WALLPAPER_SURVEY_PANELIST
feature-flag gate in BravePrivacySettings to also require
!BraveOriginSubscriptionPrefs.getIsCredentialSummaryActiveCached() for
both the preference visibility and the settings-search index entry.

Resolves: https://github.com/brave/brave-browser/issues/54853
2026-04-22 22:12:47 +01:00
samartnik 380731a553 [Android] Fix Clear data on exit not clearing omnibox suggestions (#35790)
ShortcutsBackend initializes asynchronously. When clearBrowsingData() was
called during startup, the backend was still in the INITIALIZING state and
its OnHistoryDeletions handler silently returned early, leaving shortcut
suggestions (clock-icon entries) intact after exit.

Fix by adding a JNI bridge (BraveShortcutsUtils.initThenRun) that waits for
ShortcutsBackend to finish its async DB init via OnShortcutsLoaded() before
invoking clearBrowsingData(). Also move the clear-on-exit call from
initializeState() to finishNativeInitialization() where the profile is
available, and add FORM_DATA (autofill) to the cleared data types.
2026-04-22 14:36:13 -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
Serg be90a732da [Android] Suppress VPN link-subscription dialog when disabled by policy (#35719)
BraveActivity shows LinkVpnSubscriptionDialogFragment when a VPN
subscription is detected on the device and the link dialog has not yet
been shown. The guard did not consult the VPN policy pref, so the dialog
was presented even to users whose VPN has been disabled by policy (e.g.
Brave Origin users with VPN turned off at the policy layer).

Add !BraveVpnPolicy.isDisabledByPolicy(mTabModelProfileSupplier.get()) to
the guard.

Resolves: https://github.com/brave/brave-browser/issues/54786
2026-04-21 18:46:54 +01:00
Serg a59d89fa21 [Android] Update Brave Origin paywall and settings copy per design feedback (#35700)
String changes in android_brave_strings.grd:
- IDS_MENU_ORIGIN: "Origin" -> "Brave Origin" (Settings menu row).
- IDS_BRAVE_ORIGIN_PREMIUM: "Origin" -> "Brave Origin" (paywall title).
- IDS_ORIGIN_LEO_AI_TOGGLE: "AI" -> "Leo AI" (toggle label
  consistency with other Leo surfaces).
- IDS_ORIGIN_DESCRIPTION_BODY: drop the trailing sentence
  "Origin will remove most other features from the browser."
- IDS_ORIGIN_CHANGING_BRAVE_FEATURES_MESSAGE_POST_PURCHASE:
  "once Origin has finished updating." ->
  "once Brave Origin has finished updating."
- IDS_ORIGIN_PAYWALL_TEXT_4: rewritten to
  "One-time purchase can be activated multiple times across all
  your devices".
- IDS_ORIGIN_DESCRIPTION_NOTE: removed entirely (Search Premium
  note no longer shown).

Layout changes:
- brave_origin_description_preference.xml: remove the
  origin_description_note TextView from the preference-screen
  description block.
- activity_brave_origin_plans.xml (portrait paywall) and
  layout-land/activity_brave_origin_plans.xml (landscape
  paywall): remove the note TextView; body description's bottom
  margin bumped from 16dp to 24dp to preserve spacing with the
  next section.

Resolves: https://github.com/brave/brave-browser/issues/54761
2026-04-21 01:14:29 +01:00
Serg 37e0eeb8f1 [Android] Hide send_web_discovery toggle when managed by policy (#35680)
BraveSearchEnginesPreferences.removePreferenceIfPresent was calling
getPreferenceScreen().removePreference(pref) unconditionally. That
only removes direct children of PreferenceScreen — when the target
preference is nested inside a PreferenceCategory (as send_web_discovery
is, inside currently_used_search_engines_category), the remove call
silently returns false and the toggle stays visible.

Users whose WebDiscoveryEnabled pref is managed by policy (e.g. Brave
Origin subscribers, enterprise admins) saw the toggle rendered and
greyed-out instead of being hidden entirely.

Fix: remove from the preference's actual parent group.
preference.getParent() returns the containing PreferenceGroup — the
PreferenceCategory for nested prefs, the PreferenceScreen itself for
top-level prefs. Works for both cases.

Other PREF_CUSTOM_SEARCH_ENGINES_CATEGORY caller is a top-level
PreferenceCategory; new behavior is equivalent for that case.

Resolves: https://github.com/brave/brave-browser/issues/54751
2026-04-20 18:28:02 +00:00
Serg 34f390c990 [Android] Honor Brave Rewards disabled-by-policy pref (#35651)
brave_rewards::IsDisabledByPolicy() was hardcoded to return false on
Android regardless of the managed kDisabledByPolicy pref, so every
native call site that gates on brave_rewards::IsSupported() failed to
suppress for Brave Origin subscribers (and enterprise admins setting
the BraveRewardsDisabled policy).

Symptoms fixed:
- Ads service kept initializing on Android for Origin profiles
  (AdsServiceFactory::GetForProfile gates on IsSupported).
- NTP sponsored background images and sponsored rich-media takeover
  rendered (downstream of the ads service via ViewCounterService).
- DAY_10 / DAY_30 / DAY_35 Rewards retention notifications fired
  (RetentionNotificationPublisher gates on rewardsNativeWorker
  .isSupported).

Java-side Rewards UI surfaces were already correctly gated via
BraveRewardsPolicy.isDisabledByPolicy(profile) and are unaffected.

Also decouples BraveVpnUtils.isRegionSupported() from
BraveRewardsNativeWorker.isSupported() — otherwise the guard flip would
cause VPN UI to hide for any profile where Rewards is policy-disabled
as a side effect. Added BraveVpnNativeWorker.isSupportedRegion that
does the OFAC region check directly via brave_l10n.

Resolves: https://github.com/brave/brave-browser/issues/54703
2026-04-20 17:08:14 +01:00
samartnik f717b29ba2 [Android] Fix for custom search engine footer with settings containment (#35673) 2026-04-20 11:51:28 -04:00
Pavel Beloborodov ebbb41978f Added ENABLE_EMAIL_ALIASES buildflag. (#35528)
* Added ENABLE_EMAIL_ALIASES buildflag.
2026-04-20 20:33:07 +07:00
Serg 8b37ade21d [Android] Fix Origin paywall stuck during Play Store purchase restore (#35606)
When a user who previously purchased Brave Origin switches devices,
verifyPurchase() at startup finds the Play Store purchase and kicks off
the SKUs createOrderFromReceipt / fetchOrderCredentials chain to obtain
an order ID. Until that chain completes, requestCredentialSummary
returns inactive, so Settings -> Brave Origin launches the paywall even
though a purchase exists and is mid-restore.

Gate handleOriginPreferenceClick on isFetchingCredentials() and route
directly to BraveOriginPreferences (which renders the fetching spinner
via its existing setCredentialsFetchedCallback path) when a restore is
in flight.

Also harden setCredentialsFetchedCallback against a lost-notification
race: after registering the callback, re-check isFetchingCredentials()
and synthesize a success notification if the fetch already completed.
Order-ID-set is the only path that flips the state to false, so
synthesizing success is safe.

Resolves: https://github.com/brave/brave-browser/issues/54637
2026-04-16 23:48:12 +00:00
Serg 90fadf6259 [Android] Register Brave as Android AutofillService for address autofill (#35567)
* [Android] Register Brave as Android AutofillService for address autofill

Re-enables the Android AutofillService that was removed in
https://github.com/brave/brave-core/pull/25759 due to crashes on
split-APK installs. Uses the SplitCompat pattern
(SplitCompatAutofillService base class) so the service works correctly
when installed from the Play Store.

When the user selects Brave as their autofill provider in Android Settings,
Brave can fill saved address profiles into third-party apps and save new
addresses from manually filled forms.

Resolves: https://github.com/brave/brave-browser/issues/41334
2026-04-16 14:23:41 -04:00
AlexeyBarabash 5e58cbf234 Fixed search settings for Brave's languages page (#35544)
Resolves https://github.com/brave/brave-browser/issues/54524
2026-04-16 11:08:29 +03:00
Szilard Szaloki d615f4b477 Account: moves to OTP-based email verification (#35502) 2026-04-16 05:42:25 +01:00
Anton Paymyshev eebe1d9885 Remove KeyedService from some wallet services (#35527) 2026-04-15 18:09:18 +01:00
Kevin Smith beee7d891d [Rewards] Remove Gemini wallet provider (#35380) 2026-04-14 22:11:29 -04:00
Serg 40e05127bf Revert "[Android] Initialize bottom controls synchronously to fix progress bar" (#35510)
Revert "[Android] Initialize bottom controls synchronously to fix progress ba…"

This reverts commit 5ba39ce79e.
2026-04-14 22:14:36 +00:00
AlexeyBarabash d1ad84c72c [Android] Implemented SEARCH_INDEX_DATA_PROVIDER for AppearancePreferences (#35437)
Resolves https://github.com/brave/brave-browser/issues/54408
2026-04-14 19:55:52 +03:00