From 90595e40d20983d0696fec5903a05b6bf745924e Mon Sep 17 00:00:00 2001 From: Justin Weir Date: Thu, 3 Nov 2022 12:30:33 -0400 Subject: [PATCH] Add ShadeController to KeyguardViewMediator ShadeController is not used yet, but adding the member var as a standalone CL will allow ag/20355131 to automerge without conflicts and save us some code review effort. Bug: 249277686 Test: presubmits Change-Id: I9cb717410e32c1f2da2711c91f532ab05c0b410b Merged-In: I9cb717410e32c1f2da2711c91f532ab05c0b410b --- .../com/android/systemui/keyguard/KeyguardViewMediator.java | 4 ++++ .../com/android/systemui/keyguard/dagger/KeyguardModule.java | 3 +++ .../android/systemui/keyguard/KeyguardViewMediatorTest.java | 3 +++ 3 files changed, 10 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 6f1ad703b5269..7cd3843fd5066 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -125,6 +125,7 @@ import com.android.systemui.keyguard.dagger.KeyguardModule; import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.shade.NotificationPanelViewController; +import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.statusbar.CommandQueue; @@ -266,6 +267,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, private final Executor mUiBgExecutor; private final ScreenOffAnimationController mScreenOffAnimationController; private final Lazy mNotificationShadeDepthController; + private final Lazy mShadeController; private boolean mSystemReady; private boolean mBootCompleted; @@ -1149,6 +1151,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, ScreenOnCoordinator screenOnCoordinator, InteractionJankMonitor interactionJankMonitor, DreamOverlayStateController dreamOverlayStateController, + Lazy shadeControllerLazy, Lazy notificationShadeWindowControllerLazy, Lazy activityLaunchAnimator) { mContext = context; @@ -1164,6 +1167,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, mTrustManager = trustManager; mUserSwitcherController = userSwitcherController; mKeyguardDisplayManager = keyguardDisplayManager; + mShadeController = shadeControllerLazy; dumpManager.registerDumpable(getClass().getName(), this); mDeviceConfig = deviceConfig; mScreenOnCoordinator = screenOnCoordinator; diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java index f08463bfd5e9c..78a7c9e35eb70 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java @@ -47,6 +47,7 @@ import com.android.systemui.keyguard.data.repository.KeyguardRepositoryModule; import com.android.systemui.keyguard.domain.interactor.StartKeyguardTransitionModule; import com.android.systemui.keyguard.domain.quickaffordance.KeyguardQuickAffordanceModule; import com.android.systemui.navigationbar.NavigationModeController; +import com.android.systemui.shade.ShadeController; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.SysuiStatusBarStateController; @@ -108,6 +109,7 @@ public class KeyguardModule { ScreenOnCoordinator screenOnCoordinator, InteractionJankMonitor interactionJankMonitor, DreamOverlayStateController dreamOverlayStateController, + Lazy shadeController, Lazy notificationShadeWindowController, Lazy activityLaunchAnimator) { return new KeyguardViewMediator( @@ -135,6 +137,7 @@ public class KeyguardModule { screenOnCoordinator, interactionJankMonitor, dreamOverlayStateController, + shadeController, notificationShadeWindowController, activityLaunchAnimator); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java index 2c3ddd574b0fd..b6780a12e6a95 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java @@ -57,6 +57,7 @@ import com.android.systemui.classifier.FalsingCollectorFake; import com.android.systemui.dreams.DreamOverlayStateController; import com.android.systemui.dump.DumpManager; import com.android.systemui.navigationbar.NavigationModeController; +import com.android.systemui.shade.ShadeController; import com.android.systemui.statusbar.NotificationShadeDepthController; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.SysuiStatusBarStateController; @@ -105,6 +106,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { private @Mock ScreenOffAnimationController mScreenOffAnimationController; private @Mock InteractionJankMonitor mInteractionJankMonitor; private @Mock ScreenOnCoordinator mScreenOnCoordinator; + private @Mock ShadeController mShadeController; private @Mock Lazy mNotificationShadeWindowControllerLazy; private @Mock DreamOverlayStateController mDreamOverlayStateController; private @Mock ActivityLaunchAnimator mActivityLaunchAnimator; @@ -307,6 +309,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mScreenOnCoordinator, mInteractionJankMonitor, mDreamOverlayStateController, + () -> mShadeController, mNotificationShadeWindowControllerLazy, () -> mActivityLaunchAnimator); mViewMediator.start();