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

Commit 402468a3 authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge "Migrate BackActionInteractor setup from CentralSurfaces to Dagger" into main

parents a152de0b 7b8e566f
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -119,9 +119,10 @@ class BackActionInteractorTest : SysuiTestCase() {
            statusBarKeyguardViewManager,
            statusBarKeyguardViewManager,
            shadeController,
            shadeController,
            notificationShadeWindowController,
            notificationShadeWindowController,
                windowRootViewVisibilityInteractor
            windowRootViewVisibilityInteractor,
            shadeBackActionInteractor,
            qsController,
        )
        )
            .apply { this.setup(qsController, shadeBackActionInteractor) }
    }
    }


    private val powerInteractor = PowerInteractorFactory.create().powerInteractor
    private val powerInteractor = PowerInteractorFactory.create().powerInteractor
+3 −9
Original line number Original line Diff line number Diff line
@@ -47,7 +47,9 @@ constructor(
    private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager,
    private val statusBarKeyguardViewManager: StatusBarKeyguardViewManager,
    private val shadeController: ShadeController,
    private val shadeController: ShadeController,
    private val notificationShadeWindowController: NotificationShadeWindowController,
    private val notificationShadeWindowController: NotificationShadeWindowController,
    private val windowRootViewVisibilityInteractor: WindowRootViewVisibilityInteractor
    private val windowRootViewVisibilityInteractor: WindowRootViewVisibilityInteractor,
    private val shadeBackActionInteractor: ShadeBackActionInteractor,
    private val qsController: QuickSettingsController,
) : CoreStartable {
) : CoreStartable {


    private var isCallbackRegistered = false
    private var isCallbackRegistered = false
@@ -77,14 +79,6 @@ constructor(
        get() =
        get() =
            notificationShadeWindowController.windowRootView?.viewRootImpl?.onBackInvokedDispatcher
            notificationShadeWindowController.windowRootView?.viewRootImpl?.onBackInvokedDispatcher


    private lateinit var shadeBackActionInteractor: ShadeBackActionInteractor
    private lateinit var qsController: QuickSettingsController

    fun setup(qsController: QuickSettingsController, svController: ShadeBackActionInteractor) {
        this.qsController = qsController
        this.shadeBackActionInteractor = svController
    }

    override fun start() {
    override fun start() {
        scope.launch {
        scope.launch {
            windowRootViewVisibilityInteractor.isLockscreenOrShadeVisibleAndInteractive.collect {
            windowRootViewVisibilityInteractor.isLockscreenOrShadeVisibleAndInteractive.collect {
+0 −1
Original line number Original line Diff line number Diff line
@@ -1509,7 +1509,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        mNotificationShadeWindowController.fetchWindowRootView();
        mNotificationShadeWindowController.fetchWindowRootView();
        getNotificationShadeWindowViewController().setupExpandedStatusBar();
        getNotificationShadeWindowViewController().setupExpandedStatusBar();
        getNotificationShadeWindowViewController().setupCommunalHubLayout();
        getNotificationShadeWindowViewController().setupCommunalHubLayout();
        mBackActionInteractor.setup(mQsController, mShadeSurface);
    }
    }


    protected NotificationShadeWindowViewController getNotificationShadeWindowViewController() {
    protected NotificationShadeWindowViewController getNotificationShadeWindowViewController() {