diff options
| author | 2024-09-24 14:23:49 +0000 | |
|---|---|---|
| committer | 2024-09-24 14:23:49 +0000 | |
| commit | 402468a3c57b47c1be05292174805997ca11f4e6 (patch) | |
| tree | 13dcd9ae34e0f664a4b49ae996c7450bf905e811 | |
| parent | a152de0b358a304d90bde365b301c068e57343dc (diff) | |
| parent | 7b8e566fd23f152f997825248ca4bd4244095b97 (diff) | |
Merge "Migrate BackActionInteractor setup from CentralSurfaces to Dagger" into main
3 files changed, 12 insertions, 18 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt index cbad133ba4f0..8c7cd619a158 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt @@ -114,14 +114,15 @@ class BackActionInteractorTest : SysuiTestCase() { private val backActionInteractor: BackActionInteractor by lazy { BackActionInteractor( - testScope.backgroundScope, - statusBarStateController, - statusBarKeyguardViewManager, - shadeController, - notificationShadeWindowController, - windowRootViewVisibilityInteractor - ) - .apply { this.setup(qsController, shadeBackActionInteractor) } + testScope.backgroundScope, + statusBarStateController, + statusBarKeyguardViewManager, + shadeController, + notificationShadeWindowController, + windowRootViewVisibilityInteractor, + shadeBackActionInteractor, + qsController, + ) } private val powerInteractor = PowerInteractorFactory.create().powerInteractor diff --git a/packages/SystemUI/src/com/android/systemui/back/domain/interactor/BackActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/back/domain/interactor/BackActionInteractor.kt index 5bd7e5455c2b..23045a336a5d 100644 --- a/packages/SystemUI/src/com/android/systemui/back/domain/interactor/BackActionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/back/domain/interactor/BackActionInteractor.kt @@ -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 { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 59533b343a57..506354c66a78 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -1509,7 +1509,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotificationShadeWindowController.fetchWindowRootView(); getNotificationShadeWindowViewController().setupExpandedStatusBar(); getNotificationShadeWindowViewController().setupCommunalHubLayout(); - mBackActionInteractor.setup(mQsController, mShadeSurface); } protected NotificationShadeWindowViewController getNotificationShadeWindowViewController() { |