Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java +5 −6 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.statusbar.RemoteInputController.Callback; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; Loading Loading @@ -96,15 +95,13 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mCallbacks = Lists.newArrayList(); private final SysuiColorExtractor mColorExtractor; private final SuperStatusBarViewFactory mSuperStatusBarViewFactory; @Inject public NotificationShadeWindowController(Context context, WindowManager windowManager, IActivityManager activityManager, DozeParameters dozeParameters, StatusBarStateController statusBarStateController, ConfigurationController configurationController, KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor, SuperStatusBarViewFactory superStatusBarViewFactory) { KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor) { mContext = context; mWindowManager = windowManager; mActivityManager = activityManager; Loading @@ -114,8 +111,6 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mLpChanged = new LayoutParams(); mKeyguardBypassController = keyguardBypassController; mColorExtractor = colorExtractor; mSuperStatusBarViewFactory = superStatusBarViewFactory; mNotificationShadeView = mSuperStatusBarViewFactory.getNotificationShadeWindowView(); mLockScreenDisplayTimeout = context.getResources() .getInteger(R.integer.config_lockScreenDisplayTimeout); Loading Loading @@ -194,6 +189,10 @@ public class NotificationShadeWindowController implements Callback, Dumpable, onThemeChanged(); } public void setNotificationShadeView(ViewGroup view) { mNotificationShadeView = view; } public ViewGroup getNotificationShadeView() { return mNotificationShadeView; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -1353,6 +1353,7 @@ public class StatusBar extends SystemUI implements DemoMode, .statusBarWindowView(mNotificationShadeWindowView).build(); mNotificationShadeWindowViewController = statusBarComponent .getNotificationShadeWindowViewController(); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowViewController.setupExpandedStatusBar(); mStatusBarWindowController = statusBarComponent.getStatusBarWindowController(); mPhoneStatusBarWindow = mSuperStatusBarViewFactory.getStatusBarWindowView(); Loading packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +3 −2 Original line number Diff line number Diff line Loading @@ -201,8 +201,9 @@ public class BubbleControllerTest extends SysuiTestCase { // Bubbles get added to status bar window view mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mSuperStatusBarViewFactory); mConfigurationController, mKeyguardBypassController, mColorExtractor); mNotificationShadeWindowController.setNotificationShadeView( mSuperStatusBarViewFactory.getNotificationShadeWindowView()); mNotificationShadeWindowController.attach(); // Need notifications for bubbles Loading packages/SystemUI/tests/src/com/android/systemui/bubbles/NewNotifPipelineBubbleControllerTest.java +3 −2 Original line number Diff line number Diff line Loading @@ -195,8 +195,9 @@ public class NewNotifPipelineBubbleControllerTest extends SysuiTestCase { // Bubbles get added to status bar window view mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mSuperStatusBarViewFactory); mConfigurationController, mKeyguardBypassController, mColorExtractor); mNotificationShadeWindowController.setNotificationShadeView( mSuperStatusBarViewFactory.getNotificationShadeWindowView()); mNotificationShadeWindowController.attach(); // Need notifications for bubbles Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerTest.java +4 −8 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import androidx.test.filters.SmallTest; import com.android.internal.colorextraction.ColorExtractor; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.policy.ConfigurationController; Loading @@ -52,14 +51,13 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { @Mock private WindowManager mWindowManager; @Mock private DozeParameters mDozeParameters; @Mock private NotificationShadeWindowView mStatusBarView; @Mock private NotificationShadeWindowView mNotificationShadeWindowView; @Mock private IActivityManager mActivityManager; @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private ConfigurationController mConfigurationController; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private SysuiColorExtractor mColorExtractor; @Mock ColorExtractor.GradientColors mGradientColors; @Mock private SuperStatusBarViewFactory mSuperStatusBarViewFactory; private NotificationShadeWindowController mNotificationShadeWindowController; Loading @@ -68,13 +66,11 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { MockitoAnnotations.initMocks(this); when(mDozeParameters.getAlwaysOn()).thenReturn(true); when(mColorExtractor.getNeutralColors()).thenReturn(mGradientColors); when(mSuperStatusBarViewFactory.getNotificationShadeWindowView()) .thenReturn(mStatusBarView); mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mSuperStatusBarViewFactory); mConfigurationController, mKeyguardBypassController, mColorExtractor); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); } Loading Loading @@ -104,7 +100,7 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { @Test public void testAdd_updatesVisibilityFlags() { verify(mStatusBarView).setSystemUiVisibility(anyInt()); verify(mNotificationShadeWindowView).setSystemUiVisibility(anyInt()); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowController.java +5 −6 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.statusbar.RemoteInputController.Callback; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; Loading Loading @@ -96,15 +95,13 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mCallbacks = Lists.newArrayList(); private final SysuiColorExtractor mColorExtractor; private final SuperStatusBarViewFactory mSuperStatusBarViewFactory; @Inject public NotificationShadeWindowController(Context context, WindowManager windowManager, IActivityManager activityManager, DozeParameters dozeParameters, StatusBarStateController statusBarStateController, ConfigurationController configurationController, KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor, SuperStatusBarViewFactory superStatusBarViewFactory) { KeyguardBypassController keyguardBypassController, SysuiColorExtractor colorExtractor) { mContext = context; mWindowManager = windowManager; mActivityManager = activityManager; Loading @@ -114,8 +111,6 @@ public class NotificationShadeWindowController implements Callback, Dumpable, mLpChanged = new LayoutParams(); mKeyguardBypassController = keyguardBypassController; mColorExtractor = colorExtractor; mSuperStatusBarViewFactory = superStatusBarViewFactory; mNotificationShadeView = mSuperStatusBarViewFactory.getNotificationShadeWindowView(); mLockScreenDisplayTimeout = context.getResources() .getInteger(R.integer.config_lockScreenDisplayTimeout); Loading Loading @@ -194,6 +189,10 @@ public class NotificationShadeWindowController implements Callback, Dumpable, onThemeChanged(); } public void setNotificationShadeView(ViewGroup view) { mNotificationShadeView = view; } public ViewGroup getNotificationShadeView() { return mNotificationShadeView; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -1353,6 +1353,7 @@ public class StatusBar extends SystemUI implements DemoMode, .statusBarWindowView(mNotificationShadeWindowView).build(); mNotificationShadeWindowViewController = statusBarComponent .getNotificationShadeWindowViewController(); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowViewController.setupExpandedStatusBar(); mStatusBarWindowController = statusBarComponent.getStatusBarWindowController(); mPhoneStatusBarWindow = mSuperStatusBarViewFactory.getStatusBarWindowView(); Loading
packages/SystemUI/tests/src/com/android/systemui/bubbles/BubbleControllerTest.java +3 −2 Original line number Diff line number Diff line Loading @@ -201,8 +201,9 @@ public class BubbleControllerTest extends SysuiTestCase { // Bubbles get added to status bar window view mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mSuperStatusBarViewFactory); mConfigurationController, mKeyguardBypassController, mColorExtractor); mNotificationShadeWindowController.setNotificationShadeView( mSuperStatusBarViewFactory.getNotificationShadeWindowView()); mNotificationShadeWindowController.attach(); // Need notifications for bubbles Loading
packages/SystemUI/tests/src/com/android/systemui/bubbles/NewNotifPipelineBubbleControllerTest.java +3 −2 Original line number Diff line number Diff line Loading @@ -195,8 +195,9 @@ public class NewNotifPipelineBubbleControllerTest extends SysuiTestCase { // Bubbles get added to status bar window view mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mSuperStatusBarViewFactory); mConfigurationController, mKeyguardBypassController, mColorExtractor); mNotificationShadeWindowController.setNotificationShadeView( mSuperStatusBarViewFactory.getNotificationShadeWindowView()); mNotificationShadeWindowController.attach(); // Need notifications for bubbles Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationShadeWindowControllerTest.java +4 −8 Original line number Diff line number Diff line Loading @@ -34,7 +34,6 @@ import androidx.test.filters.SmallTest; import com.android.internal.colorextraction.ColorExtractor; import com.android.systemui.SysuiTestCase; import com.android.systemui.colorextraction.SysuiColorExtractor; import com.android.systemui.statusbar.SuperStatusBarViewFactory; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.policy.ConfigurationController; Loading @@ -52,14 +51,13 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { @Mock private WindowManager mWindowManager; @Mock private DozeParameters mDozeParameters; @Mock private NotificationShadeWindowView mStatusBarView; @Mock private NotificationShadeWindowView mNotificationShadeWindowView; @Mock private IActivityManager mActivityManager; @Mock private SysuiStatusBarStateController mStatusBarStateController; @Mock private ConfigurationController mConfigurationController; @Mock private KeyguardBypassController mKeyguardBypassController; @Mock private SysuiColorExtractor mColorExtractor; @Mock ColorExtractor.GradientColors mGradientColors; @Mock private SuperStatusBarViewFactory mSuperStatusBarViewFactory; private NotificationShadeWindowController mNotificationShadeWindowController; Loading @@ -68,13 +66,11 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { MockitoAnnotations.initMocks(this); when(mDozeParameters.getAlwaysOn()).thenReturn(true); when(mColorExtractor.getNeutralColors()).thenReturn(mGradientColors); when(mSuperStatusBarViewFactory.getNotificationShadeWindowView()) .thenReturn(mStatusBarView); mNotificationShadeWindowController = new NotificationShadeWindowController(mContext, mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController, mConfigurationController, mKeyguardBypassController, mColorExtractor, mSuperStatusBarViewFactory); mConfigurationController, mKeyguardBypassController, mColorExtractor); mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowController.attach(); } Loading Loading @@ -104,7 +100,7 @@ public class NotificationShadeWindowControllerTest extends SysuiTestCase { @Test public void testAdd_updatesVisibilityFlags() { verify(mStatusBarView).setSystemUiVisibility(anyInt()); verify(mNotificationShadeWindowView).setSystemUiVisibility(anyInt()); } @Test Loading