Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 508184d1 authored by Michał Brzeziński's avatar Michał Brzeziński Committed by Automerger Merge Worker
Browse files

Merge "Adding QS animation when going from pulsing to shade in split shade"...

Merge "Adding QS animation when going from pulsing to shade in split shade" into tm-qpr-dev am: f5bf900a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20551629



Change-Id: I5943accea736757049febcd7e50bf9435acd113e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents cf1f418c f5bf900a
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -509,9 +509,14 @@ class LockscreenShadeTransitionController @Inject constructor(
     * If secure with redaction: Show bouncer, go to unlocked shade.
     * If secure with redaction: Show bouncer, go to unlocked shade.
     * If secure without redaction or no security: Go to [StatusBarState.SHADE_LOCKED].
     * 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 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
     * @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
    @JvmOverloads
    fun goToLockedShade(expandedView: View?, needsQSAnimation: Boolean = true) {
    fun goToLockedShade(expandedView: View?, needsQSAnimation: Boolean = true) {
@@ -519,7 +524,7 @@ class LockscreenShadeTransitionController @Inject constructor(
        logger.logTryGoToLockedShade(isKeyguard)
        logger.logTryGoToLockedShade(isKeyguard)
        if (isKeyguard) {
        if (isKeyguard) {
            val animationHandler: ((Long) -> Unit)?
            val animationHandler: ((Long) -> Unit)?
            if (needsQSAnimation) {
            if (needsQSAnimation || useSplitShade) {
                // Let's use the default animation
                // Let's use the default animation
                animationHandler = null
                animationHandler = null
            } else {
            } else {
+8 −0
Original line number Original line Diff line number Diff line
@@ -243,6 +243,14 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
        assertNull(transitionController.dragDownAnimator)
        assertNull(transitionController.dragDownAnimator)
    }
    }


    @Test
    fun testGoToLockedShadeAlwaysCreatesQSAnimationInSplitShade() {
        enableSplitShade()
        transitionController.goToLockedShade(null, needsQSAnimation = true)
        verify(notificationPanelController).animateToFullShade(anyLong())
        assertNotNull(transitionController.dragDownAnimator)
    }

    @Test
    @Test
    fun testDragDownAmountDoesntCallOutInLockedDownShade() {
    fun testDragDownAmountDoesntCallOutInLockedDownShade() {
        whenever(nsslController.isInLockedDownShade).thenReturn(true)
        whenever(nsslController.isInLockedDownShade).thenReturn(true)