Loading packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java +4 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.WindowManager; import com.android.systemui.car.window.SystemUIOverlayWindowController; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.BiometricUnlockController; import com.android.systemui.statusbar.phone.DozeParameters; Loading @@ -49,12 +50,14 @@ public class DummyNotificationShadeWindowController extends NotificationShadeWin DozeParameters dozeParameters, StatusBarStateController statusBarStateController, ConfigurationController configurationController, KeyguardViewMediator keyguardViewMediator, KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor, DumpManager dumpManager, SystemUIOverlayWindowController overlayWindowController) { super(context, windowManager, activityManager, dozeParameters, statusBarStateController, configurationController, keyguardBypassController, colorExtractor, dumpManager); configurationController, keyguardViewMediator, keyguardBypassController, colorExtractor, dumpManager); mOverlayWindowController = overlayWindowController; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java +8 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable, private final boolean mKeyguardScreenRotation; private final long mLockScreenDisplayTimeout; private final Display.Mode mKeyguardDisplayMode; private final KeyguardViewMediator mKeyguardViewMediator; private final KeyguardBypassController mKeyguardBypassController; private ViewGroup mNotificationShadeView; private LayoutParams mLp; Loading @@ -104,6 +105,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable, IActivityManager activityManager, DozeParameters dozeParameters, StatusBarStateController statusBarStateController, ConfigurationController configurationController, KeyguardViewMediator keyguardViewMediator, KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor, DumpManager dumpManager) { mContext = context; Loading @@ -113,6 +115,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mDozeParameters = dozeParameters; mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze(); mLpChanged = new LayoutParams(); mKeyguardViewMediator = keyguardViewMediator; mKeyguardBypassController = keyguardBypassController; mColorExtractor = colorExtractor; dumpManager.registerDumpable(getClass().getName(), this); Loading Loading @@ -202,6 +205,11 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mWindowManager.addView(mNotificationShadeView, mLp); mLpChanged.copyFrom(mLp); onThemeChanged(); // Make the state consistent with KeyguardViewMediator#setupLocked during initialization. if (mKeyguardViewMediator.isShowingAndNotOccluded()) { setKeyguardShowing(true); } } public void setNotificationShadeView(ViewGroup view) { Loading packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.shared.system.QuickStepContract; Loading Loading @@ -135,6 +136,8 @@ public class BubbleControllerTest extends SysuiTestCase { @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private FloatingContentCoordinator mFloatingContentCoordinator; Loading Loading @@ -198,8 +201,8 @@ public class BubbleControllerTest extends SysuiTestCase { mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mDumpManager); mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController, mColorExtractor, mDumpManager); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); Loading packages/SystemUI/tests/src/com/android/systemui/bubbles/NewNotifPipelineBubbleControllerTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.FeatureFlags; Loading Loading @@ -132,6 +133,8 @@ public class NewNotifPipelineBubbleControllerTest extends SysuiTestCase { @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private FloatingContentCoordinator mFloatingContentCoordinator; Loading Loading @@ -194,8 +197,8 @@ public class NewNotifPipelineBubbleControllerTest extends SysuiTestCase { // Bubbles get added to status bar window view mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mDumpManager); mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController, mColorExtractor, mDumpManager); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerTest.java +16 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import static android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static com.google.common.truth.Truth.assertThat; Loading @@ -41,6 +42,7 @@ import com.android.internal.colorextraction.ColorExtractor; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.policy.ConfigurationController; Loading @@ -63,6 +65,7 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { @Mock private IActivityManager mActivityManager; @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private ConfigurationController mConfigurationController; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private SysuiColorExtractor mColorExtractor; @Mock ColorExtractor.GradientColors mGradientColors; Loading @@ -79,8 +82,8 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mDumpManager); mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController, mColorExtractor, mDumpManager); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); Loading Loading @@ -119,6 +122,17 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { mNotificationShadeWindowController.setForcePluginOpen(true); } @Test public void attach_visibleWithWallpaper() { clearInvocations(mWindowManager); when(mKeyguardViewMediator.isShowingAndNotOccluded()).thenReturn(true); mNotificationShadeWindowController.attach(); verify(mNotificationShadeWindowView).setVisibility(eq(View.VISIBLE)); verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); assertThat((mLayoutParameters.getValue().flags & FLAG_SHOW_WALLPAPER) != 0).isTrue(); } @Test public void setBackgroundBlurRadius_expandedWithBlurs() { mNotificationShadeWindowController.setBackgroundBlurRadius(10); Loading Loading
packages/CarSystemUI/src/com/android/systemui/car/statusbar/DummyNotificationShadeWindowController.java +4 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.WindowManager; import com.android.systemui.car.window.SystemUIOverlayWindowController; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.phone.BiometricUnlockController; import com.android.systemui.statusbar.phone.DozeParameters; Loading @@ -49,12 +50,14 @@ public class DummyNotificationShadeWindowController extends NotificationShadeWin DozeParameters dozeParameters, StatusBarStateController statusBarStateController, ConfigurationController configurationController, KeyguardViewMediator keyguardViewMediator, KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor, DumpManager dumpManager, SystemUIOverlayWindowController overlayWindowController) { super(context, windowManager, activityManager, dozeParameters, statusBarStateController, configurationController, keyguardBypassController, colorExtractor, dumpManager); configurationController, keyguardViewMediator, keyguardBypassController, colorExtractor, dumpManager); mOverlayWindowController = overlayWindowController; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java +8 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable, private final boolean mKeyguardScreenRotation; private final long mLockScreenDisplayTimeout; private final Display.Mode mKeyguardDisplayMode; private final KeyguardViewMediator mKeyguardViewMediator; private final KeyguardBypassController mKeyguardBypassController; private ViewGroup mNotificationShadeView; private LayoutParams mLp; Loading @@ -104,6 +105,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable, IActivityManager activityManager, DozeParameters dozeParameters, StatusBarStateController statusBarStateController, ConfigurationController configurationController, KeyguardViewMediator keyguardViewMediator, KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor, DumpManager dumpManager) { mContext = context; Loading @@ -113,6 +115,7 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mDozeParameters = dozeParameters; mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze(); mLpChanged = new LayoutParams(); mKeyguardViewMediator = keyguardViewMediator; mKeyguardBypassController = keyguardBypassController; mColorExtractor = colorExtractor; dumpManager.registerDumpable(getClass().getName(), this); Loading Loading @@ -202,6 +205,11 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mWindowManager.addView(mNotificationShadeView, mLp); mLpChanged.copyFrom(mLp); onThemeChanged(); // Make the state consistent with KeyguardViewMediator#setupLocked during initialization. if (mKeyguardViewMediator.isShowingAndNotOccluded()) { setKeyguardShowing(true); } } public void setNotificationShadeView(ViewGroup view) { Loading
packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.shared.system.QuickStepContract; Loading Loading @@ -135,6 +136,8 @@ public class BubbleControllerTest extends SysuiTestCase { @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private FloatingContentCoordinator mFloatingContentCoordinator; Loading Loading @@ -198,8 +201,8 @@ public class BubbleControllerTest extends SysuiTestCase { mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mDumpManager); mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController, mColorExtractor, mDumpManager); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); Loading
packages/SystemUI/tests/src/com/android/systemui/bubbles/NewNotifPipelineBubbleControllerTest.java +5 −2 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.FeatureFlags; Loading Loading @@ -132,6 +133,8 @@ public class NewNotifPipelineBubbleControllerTest extends SysuiTestCase { @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private FloatingContentCoordinator mFloatingContentCoordinator; Loading Loading @@ -194,8 +197,8 @@ public class NewNotifPipelineBubbleControllerTest extends SysuiTestCase { // Bubbles get added to status bar window view mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mDumpManager); mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController, mColorExtractor, mDumpManager); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerTest.java +16 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import static android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static com.google.common.truth.Truth.assertThat; Loading @@ -41,6 +42,7 @@ import com.android.internal.colorextraction.ColorExtractor; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.policy.ConfigurationController; Loading @@ -63,6 +65,7 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { @Mock private IActivityManager mActivityManager; @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private ConfigurationController mConfigurationController; @Mock private KeyguardViewMediator mKeyguardViewMediator; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private SysuiColorExtractor mColorExtractor; @Mock ColorExtractor.GradientColors mGradientColors; Loading @@ -79,8 +82,8 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mDumpManager); mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController, mColorExtractor, mDumpManager); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); Loading Loading @@ -119,6 +122,17 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { mNotificationShadeWindowController.setForcePluginOpen(true); } @Test public void attach_visibleWithWallpaper() { clearInvocations(mWindowManager); when(mKeyguardViewMediator.isShowingAndNotOccluded()).thenReturn(true); mNotificationShadeWindowController.attach(); verify(mNotificationShadeWindowView).setVisibility(eq(View.VISIBLE)); verify(mWindowManager).updateViewLayout(any(), mLayoutParameters.capture()); assertThat((mLayoutParameters.getValue().flags & FLAG_SHOW_WALLPAPER) != 0).isTrue(); } @Test public void setBackgroundBlurRadius_expandedWithBlurs() { mNotificationShadeWindowController.setBackgroundBlurRadius(10); Loading