Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff53253c authored by Dave Mankoff's avatar Dave Mankoff Committed by Android (Google) Code Review
Browse files

Merge "Make BiometricUnlockController injectable."

parents 2b34d6c2 bbc2f8f7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -101,6 +101,9 @@ abstract class CarSystemUIModule {
    abstract SystemUIRootComponent bindSystemUIRootComponent(
            CarSystemUIRootComponent systemUIRootComponent);

    @Binds
    public abstract StatusBar bindStatusBar(CarStatusBar statusBar);

    @Binds
    @IntoMap
    @ClassKey(StatusBar.class)
+4 −1
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ import com.android.systemui.statusbar.notification.logging.NotifLog;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
import com.android.systemui.statusbar.phone.DozeParameters;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
@@ -299,6 +300,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
            DozeParameters dozeParameters,
            ScrimController scrimController,
            Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
            Lazy<BiometricUnlockController> biometricUnlockControllerLazy,

            /* Car Settings injected components. */
            NavigationBarViewFactory navigationBarViewFactory) {
@@ -361,7 +363,8 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt
                notifLog,
                dozeParameters,
                scrimController,
                lockscreenWallpaperLazy);
                lockscreenWallpaperLazy,
                biometricUnlockControllerLazy);
        mScrimController = scrimController;
        mNavigationBarViewFactory = navigationBarViewFactory;
    }
+7 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.view.IWindowManager;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;

import com.android.internal.util.LatencyTracker;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.systemui.dagger.qualifiers.BgHandler;
import com.android.systemui.dagger.qualifiers.MainResources;
@@ -75,6 +76,12 @@ public class SystemServicesModule {
        return WindowManagerGlobal.getWindowManagerService();
    }

    @Singleton
    @Provides
    static LatencyTracker provideLatencyTracker(Context context) {
        return LatencyTracker.getInstance(context);
    }

    @SuppressLint("MissingPermission")
    @Singleton
    @Provides
+3 −1
Original line number Diff line number Diff line
@@ -36,7 +36,9 @@ import dagger.Provides;
 * A dagger module for injecting components of System UI that are not overridden by the System UI
 * implementation.
 */
@Module(includes = {AssistModule.class, ComponentBinder.class, PeopleHubModule.class})
@Module(includes = {AssistModule.class,
                    ComponentBinder.class,
                    PeopleHubModule.class})
public abstract class SystemUIModule {

    @Singleton
+5 −10
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ public class DozeFactory {
    private final ProximitySensor mProximitySensor;
    private final DelayedWakeLock.Builder mDelayedWakeLockBuilder;
    private final Handler mHandler;
    private final BiometricUnlockController mBiometricUnlockController;

    @Inject
    public DozeFactory(FalsingManager falsingManager, DozeLog dozeLog,
@@ -65,7 +66,8 @@ public class DozeFactory {
            WakefulnessLifecycle wakefulnessLifecycle, KeyguardUpdateMonitor keyguardUpdateMonitor,
            DockManager dockManager, @Nullable IWallpaperManager wallpaperManager,
            ProximitySensor proximitySensor,
            DelayedWakeLock.Builder delayedWakeLockBuilder, Handler handler) {
            DelayedWakeLock.Builder delayedWakeLockBuilder, Handler handler,
            BiometricUnlockController biometricUnlockController) {
        mFalsingManager = falsingManager;
        mDozeLog = dozeLog;
        mDozeParameters = dozeParameters;
@@ -79,6 +81,7 @@ public class DozeFactory {
        mProximitySensor = proximitySensor;
        mDelayedWakeLockBuilder = delayedWakeLockBuilder;
        mHandler = handler;
        mBiometricUnlockController = biometricUnlockController;
    }

    /** Creates a DozeMachine with its parts for {@code dozeService}. */
@@ -107,9 +110,7 @@ public class DozeFactory {
                createDozeScreenBrightness(dozeService, wrappedService, mAsyncSensorManager, host,
                        mDozeParameters, mHandler),
                new DozeWallpaperState(
                        mWallpaperManager,
                        getBiometricUnlockController(dozeService),
                        mDozeParameters),
                        mWallpaperManager, mBiometricUnlockController, mDozeParameters),
                new DozeDockHandler(dozeService, machine, host, config, mHandler, mDockManager),
                new DozeAuthRemover(dozeService)
        });
@@ -149,10 +150,4 @@ public class DozeFactory {
        final SystemUIApplication app = (SystemUIApplication) appCandidate;
        return app.getComponent(DozeHost.class);
    }

    public static BiometricUnlockController getBiometricUnlockController(DozeService service) {
        Application appCandidate = service.getApplication();
        final SystemUIApplication app = (SystemUIApplication) appCandidate;
        return app.getComponent(BiometricUnlockController.class);
    }
}
Loading