diff options
| author | 2023-01-09 14:26:24 +0000 | |
|---|---|---|
| committer | 2023-01-09 14:26:24 +0000 | |
| commit | f5bf900a9673abef4e8ecf7b68fc10e1190193c9 (patch) | |
| tree | ccf4174ba3a2f1cd7c82ff678241f43c9587ef57 | |
| parent | dc590194d2ada66115651313189cce0d8c4416ad (diff) | |
| parent | 9400cbf086b905ae30b9e9f38b2d3c93e2d7d58f (diff) | |
Merge "Adding QS animation when going from pulsing to shade in split shade" into tm-qpr-dev
2 files changed, 15 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt index 905cc3fc71e0..f565f3daf2ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt @@ -509,9 +509,14 @@ class LockscreenShadeTransitionController @Inject constructor( * If secure with redaction: Show bouncer, go to unlocked shade. * If secure without redaction or no security: Go to [StatusBarState.SHADE_LOCKED]. * + * Split shade is special case and [needsQSAnimation] will be always overridden to true. + * That's because handheld shade will automatically follow notifications animation, but that's + * not the case for split shade. + * * @param expandView The view to expand after going to the shade * @param needsQSAnimation if this needs the quick settings to slide in from the top or if - * that's already handled separately + * that's already handled separately. This argument will be ignored on + * split shade as there QS animation can't be handled separately. */ @JvmOverloads fun goToLockedShade(expandedView: View?, needsQSAnimation: Boolean = true) { @@ -519,7 +524,7 @@ class LockscreenShadeTransitionController @Inject constructor( logger.logTryGoToLockedShade(isKeyguard) if (isKeyguard) { val animationHandler: ((Long) -> Unit)? - if (needsQSAnimation) { + if (needsQSAnimation || useSplitShade) { // Let's use the default animation animationHandler = null } else { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt index 3d11ced6207d..702f278746be 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt @@ -244,6 +244,14 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { } @Test + fun testGoToLockedShadeAlwaysCreatesQSAnimationInSplitShade() { + enableSplitShade() + transitionController.goToLockedShade(null, needsQSAnimation = true) + verify(notificationPanelController).animateToFullShade(anyLong()) + assertNotNull(transitionController.dragDownAnimator) + } + + @Test fun testDragDownAmountDoesntCallOutInLockedDownShade() { whenever(nsslController.isInLockedDownShade).thenReturn(true) transitionController.dragDownAmount = 10f |