diff options
2 files changed, 20 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index 98a711d122fc..5014c83bf353 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1666,7 +1666,15 @@ public class NotificationPanelViewController extends PanelViewController { mQsExpandImmediate = true; setShowShelfOnly(true); } - if (isFullyCollapsed()) { + if (mShouldUseSplitNotificationShade && isOnKeyguard()) { + // It's a special case as this method is likely to not be initiated by finger movement + // but rather called from adb shell or accessibility service. + // In the future method below could be used for non-split shade as well but currently + // motion in that case looks worse than using flingSettings. + // TODO: make below function transitioning smoothly also in portrait with empty target + mLockscreenShadeTransitionController.goToLockedShade( + /* expandedView= */null, /* needsQSAnimation= */false); + } else if (isFullyCollapsed()) { expand(true /* animate */); } else { traceQsJank(true /* startTracing */, false /* wasCancelled */); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java index 6997b3e4bd70..a5915c654aef 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewControllerTest.java @@ -1005,6 +1005,17 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase { } @Test + public void testExpandWithQsMethodIsUsingLockscreenTransitionController() { + enableSplitShade(/* enabled= */ true); + mStatusBarStateController.setState(KEYGUARD); + + mNotificationPanelViewController.expandWithQs(); + + verify(mLockscreenShadeTransitionController).goToLockedShade( + /* expandedView= */null, /* needsQSAnimation= */false); + } + + @Test public void testUnlockAnimationDoesNotAffectScrim() { mNotificationPanelViewController.onUnlockHintStarted(); verify(mScrimController).setExpansionAffectsAlpha(false); |