[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}
This commit is contained in:
AlexeyBarabash
2026-04-27 12:00:45 +01:00
committed by Claudio DeSouza
parent 683f4f7ed7
commit 5794409827
2 changed files with 2 additions and 2 deletions
@@ -34,7 +34,7 @@ public class BraveFragmentDependencyProvider extends FragmentDependencyProvider
public BraveFragmentDependencyProvider(
Activity activity,
Profile profile,
MonotonicObservableSupplier<WindowAndroid> windowAndroidSupplier,
OneshotSupplier<WindowAndroid> windowAndroidSupplier,
ActivityResultTracker activityResultTracker,
OneshotSupplier<SnackbarManager> snackbarManagerSupplier,
OneshotSupplier<BottomSheetController> bottomSheetControllerSupplier,