Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +1 −0 Original line number Diff line number Diff line Loading @@ -4842,6 +4842,7 @@ public class NotificationPanelViewController extends PanelViewController { mFragmentService.getFragmentHostManager(mView) .addTagListener(QS.TAG, mFragmentListener); mStatusBarStateController.addCallback(mStatusBarStateListener); mStatusBarStateListener.onStateChanged(mStatusBarStateController.getState()); mConfigurationController.addCallback(mConfigurationListener); // Theme might have changed between inflating this view and attaching it to the // window, so Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +13 −0 Original line number Diff line number Diff line Loading @@ -1143,6 +1143,19 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { assertThat(mNotificationPanelViewController.isQsTracking()).isFalse(); } @Test public void testOnAttachRefreshStatusBarState() { mStatusBarStateController.setState(KEYGUARD); when(mKeyguardStateController.isKeyguardFadingAway()).thenReturn(false); for (View.OnAttachStateChangeListener listener : mOnAttachStateChangeListeners) { listener.onViewAttachedToWindow(mView); } verify(mKeyguardStatusViewController).setKeyguardStatusViewVisibility( KEYGUARD/*statusBarState*/, false/*keyguardFadingAway*/, false/*goingToFullShade*/, SHADE/*oldStatusBarState*/); } private static MotionEvent createMotionEvent(int x, int y, int action) { return MotionEvent.obtain( /* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +1 −0 Original line number Diff line number Diff line Loading @@ -4842,6 +4842,7 @@ public class NotificationPanelViewController extends PanelViewController { mFragmentService.getFragmentHostManager(mView) .addTagListener(QS.TAG, mFragmentListener); mStatusBarStateController.addCallback(mStatusBarStateListener); mStatusBarStateListener.onStateChanged(mStatusBarStateController.getState()); mConfigurationController.addCallback(mConfigurationListener); // Theme might have changed between inflating this view and attaching it to the // window, so Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +13 −0 Original line number Diff line number Diff line Loading @@ -1143,6 +1143,19 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { assertThat(mNotificationPanelViewController.isQsTracking()).isFalse(); } @Test public void testOnAttachRefreshStatusBarState() { mStatusBarStateController.setState(KEYGUARD); when(mKeyguardStateController.isKeyguardFadingAway()).thenReturn(false); for (View.OnAttachStateChangeListener listener : mOnAttachStateChangeListeners) { listener.onViewAttachedToWindow(mView); } verify(mKeyguardStatusViewController).setKeyguardStatusViewVisibility( KEYGUARD/*statusBarState*/, false/*keyguardFadingAway*/, false/*goingToFullShade*/, SHADE/*oldStatusBarState*/); } private static MotionEvent createMotionEvent(int x, int y, int action) { return MotionEvent.obtain( /* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0); Loading