Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +2 −1 Original line number Diff line number Diff line Loading @@ -915,6 +915,7 @@ public final class NotificationPanelViewController implements Dumpable { mQsFrameTranslateController = qsFrameTranslateController; updateUserSwitcherFlags(); mKeyguardBottomAreaViewModel = keyguardBottomAreaViewModel; mKeyguardBottomAreaInteractor = keyguardBottomAreaInteractor; onFinishInflate(); keyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( new KeyguardUnlockAnimationController.KeyguardUnlockAnimationListener() { Loading @@ -932,7 +933,6 @@ public final class NotificationPanelViewController implements Dumpable { unlockAnimationStarted(playingCannedAnimation, isWakeAndUnlock, startDelay); } }); mKeyguardBottomAreaInteractor = keyguardBottomAreaInteractor; dumpManager.registerDumpable(this); } Loading Loading @@ -1108,6 +1108,7 @@ public final class NotificationPanelViewController implements Dumpable { mKeyguardStatusViewComponentFactory.build(keyguardStatusView); mKeyguardStatusViewController = statusViewComponent.getKeyguardStatusViewController(); mKeyguardStatusViewController.init(); updateClockAppearance(); if (mKeyguardUserSwitcherController != null) { // Try to close the switcher so that callbacks are triggered if necessary. Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +4 −2 Original line number Diff line number Diff line Loading @@ -983,7 +983,7 @@ public class NotificationStackScrollLayoutController { } public boolean isAddOrRemoveAnimationPending() { return mView.isAddOrRemoveAnimationPending(); return mView != null && mView.isAddOrRemoveAnimationPending(); } public int getVisibleNotificationCount() { Loading Loading @@ -1140,8 +1140,10 @@ public class NotificationStackScrollLayoutController { } public void setAlpha(float alpha) { if (mView != null) { mView.setAlpha(alpha); } } public float calculateAppearFraction(float height) { return mView.calculateAppearFraction(height); Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +8 −4 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; Loading Loading @@ -530,6 +531,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { .setHeadsUpAppearanceController(mock(HeadsUpAppearanceController.class)); verify(mNotificationStackScrollLayoutController) .setOnEmptySpaceClickListener(mEmptySpaceClickListenerCaptor.capture()); verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true); reset(mKeyguardStatusViewController); } @After Loading Loading @@ -609,7 +612,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { @Test public void getVerticalSpaceForLockscreenNotifications_useLockIconBottomPadding_returnsSpaceAvailable() { setBottomPadding(/* stackScrollLayoutBottom= */ 100, setBottomPadding(/* stackScrollLayoutBottom= */ 180, /* lockIconPadding= */ 20, /* indicationPadding= */ 0, /* ambientPadding= */ 0); Loading @@ -620,7 +623,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { @Test public void getVerticalSpaceForLockscreenNotifications_useIndicationBottomPadding_returnsSpaceAvailable() { setBottomPadding(/* stackScrollLayoutBottom= */ 100, setBottomPadding(/* stackScrollLayoutBottom= */ 180, /* lockIconPadding= */ 0, /* indicationPadding= */ 30, /* ambientPadding= */ 0); Loading @@ -631,7 +634,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { @Test public void getVerticalSpaceForLockscreenNotifications_useAmbientBottomPadding_returnsSpaceAvailable() { setBottomPadding(/* stackScrollLayoutBottom= */ 100, setBottomPadding(/* stackScrollLayoutBottom= */ 180, /* lockIconPadding= */ 0, /* indicationPadding= */ 0, /* ambientPadding= */ 40); Loading Loading @@ -954,7 +957,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { } @Test public void testFinishInflate_userSwitcherDisabled_doNotInflateUserSwitchView() { public void testFinishInflate_userSwitcherDisabled_doNotInflateUserSwitchView_initClock() { givenViewAttached(); when(mResources.getBoolean( com.android.internal.R.bool.config_keyguardUserSwitcher)).thenReturn(true); Loading @@ -965,6 +968,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mNotificationPanelViewController.onFinishInflate(); verify(mUserSwitcherStubView, never()).inflate(); verify(mKeyguardStatusViewController, times(3)).displayClock(LARGE, /* animate */ true); } @Test Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +2 −1 Original line number Diff line number Diff line Loading @@ -915,6 +915,7 @@ public final class NotificationPanelViewController implements Dumpable { mQsFrameTranslateController = qsFrameTranslateController; updateUserSwitcherFlags(); mKeyguardBottomAreaViewModel = keyguardBottomAreaViewModel; mKeyguardBottomAreaInteractor = keyguardBottomAreaInteractor; onFinishInflate(); keyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( new KeyguardUnlockAnimationController.KeyguardUnlockAnimationListener() { Loading @@ -932,7 +933,6 @@ public final class NotificationPanelViewController implements Dumpable { unlockAnimationStarted(playingCannedAnimation, isWakeAndUnlock, startDelay); } }); mKeyguardBottomAreaInteractor = keyguardBottomAreaInteractor; dumpManager.registerDumpable(this); } Loading Loading @@ -1108,6 +1108,7 @@ public final class NotificationPanelViewController implements Dumpable { mKeyguardStatusViewComponentFactory.build(keyguardStatusView); mKeyguardStatusViewController = statusViewComponent.getKeyguardStatusViewController(); mKeyguardStatusViewController.init(); updateClockAppearance(); if (mKeyguardUserSwitcherController != null) { // Try to close the switcher so that callbacks are triggered if necessary. Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +4 −2 Original line number Diff line number Diff line Loading @@ -983,7 +983,7 @@ public class NotificationStackScrollLayoutController { } public boolean isAddOrRemoveAnimationPending() { return mView.isAddOrRemoveAnimationPending(); return mView != null && mView.isAddOrRemoveAnimationPending(); } public int getVisibleNotificationCount() { Loading Loading @@ -1140,8 +1140,10 @@ public class NotificationStackScrollLayoutController { } public void setAlpha(float alpha) { if (mView != null) { mView.setAlpha(alpha); } } public float calculateAppearFraction(float height) { return mView.calculateAppearFraction(height); Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +8 −4 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; Loading Loading @@ -530,6 +531,8 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { .setHeadsUpAppearanceController(mock(HeadsUpAppearanceController.class)); verify(mNotificationStackScrollLayoutController) .setOnEmptySpaceClickListener(mEmptySpaceClickListenerCaptor.capture()); verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true); reset(mKeyguardStatusViewController); } @After Loading Loading @@ -609,7 +612,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { @Test public void getVerticalSpaceForLockscreenNotifications_useLockIconBottomPadding_returnsSpaceAvailable() { setBottomPadding(/* stackScrollLayoutBottom= */ 100, setBottomPadding(/* stackScrollLayoutBottom= */ 180, /* lockIconPadding= */ 20, /* indicationPadding= */ 0, /* ambientPadding= */ 0); Loading @@ -620,7 +623,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { @Test public void getVerticalSpaceForLockscreenNotifications_useIndicationBottomPadding_returnsSpaceAvailable() { setBottomPadding(/* stackScrollLayoutBottom= */ 100, setBottomPadding(/* stackScrollLayoutBottom= */ 180, /* lockIconPadding= */ 0, /* indicationPadding= */ 30, /* ambientPadding= */ 0); Loading @@ -631,7 +634,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { @Test public void getVerticalSpaceForLockscreenNotifications_useAmbientBottomPadding_returnsSpaceAvailable() { setBottomPadding(/* stackScrollLayoutBottom= */ 100, setBottomPadding(/* stackScrollLayoutBottom= */ 180, /* lockIconPadding= */ 0, /* indicationPadding= */ 0, /* ambientPadding= */ 40); Loading Loading @@ -954,7 +957,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { } @Test public void testFinishInflate_userSwitcherDisabled_doNotInflateUserSwitchView() { public void testFinishInflate_userSwitcherDisabled_doNotInflateUserSwitchView_initClock() { givenViewAttached(); when(mResources.getBoolean( com.android.internal.R.bool.config_keyguardUserSwitcher)).thenReturn(true); Loading @@ -965,6 +968,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { mNotificationPanelViewController.onFinishInflate(); verify(mUserSwitcherStubView, never()).inflate(); verify(mKeyguardStatusViewController, times(3)).displayClock(LARGE, /* animate */ true); } @Test Loading