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

Commit d72afba5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Restore timing of hideKeyguardViewAfterRemoteAnimation with the fast unlock flag." into main

parents 60392d16 91fcd639
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -712,7 +712,6 @@ class KeyguardUnlockAnimationController @Inject constructor(
        // As soon as the shade starts animating out of the way, start the canned unlock animation,
        // which will finish keyguard exit when it completes. The in-window animations in the
        // Launcher window will end on their own.
        if (fastUnlockTransition()) hideKeyguardViewAfterRemoteAnimation()
        handler.postDelayed({
            if (keyguardViewMediator.get().isShowingAndNotOccluded &&
                !keyguardStateController.isKeyguardGoingAway) {
@@ -723,7 +722,7 @@ class KeyguardUnlockAnimationController @Inject constructor(

            if ((wallpaperTargets?.isNotEmpty() == true)) {
                fadeInWallpaper()
                if (!fastUnlockTransition()) hideKeyguardViewAfterRemoteAnimation()
                hideKeyguardViewAfterRemoteAnimation()
            } else {
                keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
                    false /* cancelled */)
+13 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import org.mockito.Mockito.times
import org.mockito.Mockito.verify
import org.mockito.Mockito.verifyNoMoreInteractions
import org.mockito.MockitoAnnotations
import org.mockito.kotlin.clearInvocations
import java.util.function.Predicate

@RunWith(AndroidJUnit4::class)
@@ -336,6 +337,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() {
                false /* requestedShowSurfaceBehindKeyguard */
        )

        // Cancel the animator so we can verify only the setSurfaceBehind call below.
        keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end()
        clearInvocations(surfaceTransactionApplier)

        // Set appear to 50%, we'll just verify that we're not applying the identity matrix which
        // means an animation is in progress.
        keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(0.5f)
@@ -377,6 +382,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() {
                false /* requestedShowSurfaceBehindKeyguard */
        )

        // Cancel the animator so we can verify only the setSurfaceBehind call below.
        keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end()
        clearInvocations(surfaceTransactionApplier)

        keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f)
        keyguardUnlockAnimationController.setWallpaperAppearAmount(1f)

@@ -409,6 +418,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() {
                false /* requestedShowSurfaceBehindKeyguard */
        )

        // Stop the animator - we just want to test whether the override is not applied.
        keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end()
        clearInvocations(surfaceTransactionApplier)

        keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f)
        keyguardUnlockAnimationController.setWallpaperAppearAmount(1f)