diff options
| author | 2022-05-10 05:50:54 +0000 | |
|---|---|---|
| committer | 2022-05-10 05:50:54 +0000 | |
| commit | 8b644effca41fd47da70b9d2e617ccdc1cb27b25 (patch) | |
| tree | bccd3fd819abef026362ee7ff046a5bb4e47a0e6 | |
| parent | 5f99fcc0ecc1134ae80f7fe5c7fdcfa2168af1f7 (diff) | |
| parent | 9b8362201e797125c95b7cd2f53231ebe20aa978 (diff) | |
Merge "Fixing "adb shell cmd statusbar expand-settings" command in split shade" into tm-dev
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 77b9efa3b16b..ec13b1f835e8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1690,7 +1690,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 11f96cec6369..356d002e9da9 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 @@ -1009,6 +1009,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); |