Loading packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +7 −0 Original line number Diff line number Diff line Loading @@ -1243,6 +1243,13 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mKeyguardStatusViewController.init(); } mKeyguardStatusViewController.setSplitShadeEnabled(mSplitShadeEnabled); mKeyguardStatusViewController.getView().addOnLayoutChangeListener( (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> { int oldHeight = oldBottom - oldTop; if (v.getHeight() != oldHeight) { mNotificationStackScrollLayoutController.animateNextTopPaddingChange(); } }); updateClockAppearance(); Loading packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +17 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,23 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo assertKeyguardStatusViewCentered(); } @Test public void onKeyguardStatusViewHeightChange_animatesNextTopPaddingChangeForNSSL() { ArgumentCaptor<View.OnLayoutChangeListener> captor = ArgumentCaptor.forClass(View.OnLayoutChangeListener.class); verify(mKeyguardStatusView).addOnLayoutChangeListener(captor.capture()); View.OnLayoutChangeListener listener = captor.getValue(); clearInvocations(mNotificationStackScrollLayoutController); when(mKeyguardStatusView.getHeight()).thenReturn(0); listener.onLayoutChange(mKeyguardStatusView, /* left= */ 0, /* top= */ 0, /* right= */ 0, /* bottom= */ 0, /* oldLeft= */ 0, /* oldTop= */ 0, /* oldRight= */ 0, /* oldBottom = */ 200); verify(mNotificationStackScrollLayoutController).animateNextTopPaddingChange(); } @Test public void testCanCollapsePanelOnTouch_trueForKeyGuard() { mStatusBarStateController.setState(KEYGUARD); Loading Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +7 −0 Original line number Diff line number Diff line Loading @@ -1243,6 +1243,13 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mKeyguardStatusViewController.init(); } mKeyguardStatusViewController.setSplitShadeEnabled(mSplitShadeEnabled); mKeyguardStatusViewController.getView().addOnLayoutChangeListener( (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> { int oldHeight = oldBottom - oldTop; if (v.getHeight() != oldHeight) { mNotificationStackScrollLayoutController.animateNextTopPaddingChange(); } }); updateClockAppearance(); Loading
packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +17 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,23 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo assertKeyguardStatusViewCentered(); } @Test public void onKeyguardStatusViewHeightChange_animatesNextTopPaddingChangeForNSSL() { ArgumentCaptor<View.OnLayoutChangeListener> captor = ArgumentCaptor.forClass(View.OnLayoutChangeListener.class); verify(mKeyguardStatusView).addOnLayoutChangeListener(captor.capture()); View.OnLayoutChangeListener listener = captor.getValue(); clearInvocations(mNotificationStackScrollLayoutController); when(mKeyguardStatusView.getHeight()).thenReturn(0); listener.onLayoutChange(mKeyguardStatusView, /* left= */ 0, /* top= */ 0, /* right= */ 0, /* bottom= */ 0, /* oldLeft= */ 0, /* oldTop= */ 0, /* oldRight= */ 0, /* oldBottom = */ 200); verify(mNotificationStackScrollLayoutController).animateNextTopPaddingChange(); } @Test public void testCanCollapsePanelOnTouch_trueForKeyGuard() { mStatusBarStateController.setState(KEYGUARD); Loading