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

Commit 7b8e566f authored by Justin Weir's avatar Justin Weir
Browse files

Migrate BackActionInteractor setup from CentralSurfaces to Dagger

CentralSurfaces was calling setup its empty ShadeSurface impl instead
of the correct class bound in the dagger module, preventing the back
button from working.

Fixes: 367415673
Test: Manually checked Shade and back both with and without scenes
Flag: com.android.systemui.scene_container
Change-Id: I7506730f308eb7ef2cdf2204ec922196133cf55f
parent 5bafeec5
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -119,9 +119,10 @@ class BackActionInteractorTest : SysuiTestCase() {
            statusBarKeyguardViewManager,
            shadeController,
            notificationShadeWindowController,
                windowRootViewVisibilityInteractor
            windowRootViewVisibilityInteractor,
            shadeBackActionInteractor,
            qsController,
        )
            .apply { this.setup(qsController, shadeBackActionInteractor) }
    }

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

    private var isCallbackRegistered = false
@@ -77,14 +79,6 @@ constructor(
        get() =
            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() {
        scope.launch {
            windowRootViewVisibilityInteractor.isLockscreenOrShadeVisibleAndInteractive.collect {
+0 −1
Original line number Diff line number Diff line
@@ -1511,7 +1511,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        mNotificationShadeWindowController.fetchWindowRootView();
        getNotificationShadeWindowViewController().setupExpandedStatusBar();
        getNotificationShadeWindowViewController().setupCommunalHubLayout();
        mBackActionInteractor.setup(mQsController, mShadeSurface);
    }

    protected NotificationShadeWindowViewController getNotificationShadeWindowViewController() {