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

Commit b94543c6 authored by Robin Lee's avatar Robin Lee Committed by Automerger Merge Worker
Browse files

Merge changes from topic "explicit-keyguard-occlude-flags" into udc-dev am: a4e114a8

parents 4e69814c a4e114a8
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -205,6 +205,12 @@ class KeyguardUnlockAnimationController @Inject constructor(
     */
     */
    var playingCannedUnlockAnimation = false
    var playingCannedUnlockAnimation = false


    /**
     * Whether we reached the swipe gesture threshold to dismiss keyguard, or restore it, once
     * and should ignore any future changes to the dismiss amount before the animation finishes.
     */
    var dismissAmountThresholdsReached = false

    /**
    /**
     * Remote callback provided by Launcher that allows us to control the Launcher's unlock
     * Remote callback provided by Launcher that allows us to control the Launcher's unlock
     * animation and smartspace.
     * animation and smartspace.
@@ -763,6 +769,10 @@ class KeyguardUnlockAnimationController @Inject constructor(
            return
            return
        }
        }


        if (dismissAmountThresholdsReached) {
            return
        }

        if (!keyguardStateController.isShowing) {
        if (!keyguardStateController.isShowing) {
            return
            return
        }
        }
@@ -794,6 +804,11 @@ class KeyguardUnlockAnimationController @Inject constructor(
            return
            return
        }
        }


        // no-op if we alreaddy reached a threshold.
        if (dismissAmountThresholdsReached) {
            return
        }

        // no-op if animation is not requested yet.
        // no-op if animation is not requested yet.
        if (!keyguardViewMediator.get().requestedShowSurfaceBehindKeyguard() ||
        if (!keyguardViewMediator.get().requestedShowSurfaceBehindKeyguard() ||
                !keyguardViewMediator.get().isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe) {
                !keyguardViewMediator.get().isAnimatingBetweenKeyguardAndSurfaceBehindOrWillBe) {
@@ -808,6 +823,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
                        !keyguardStateController.isFlingingToDismissKeyguardDuringSwipeGesture &&
                        !keyguardStateController.isFlingingToDismissKeyguardDuringSwipeGesture &&
                        dismissAmount >= DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD)) {
                        dismissAmount >= DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD)) {
            setSurfaceBehindAppearAmount(1f)
            setSurfaceBehindAppearAmount(1f)
            dismissAmountThresholdsReached = true
            keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
            keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
                    false /* cancelled */)
                    false /* cancelled */)
        }
        }
@@ -942,6 +958,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
        wallpaperTargets = null
        wallpaperTargets = null


        playingCannedUnlockAnimation = false
        playingCannedUnlockAnimation = false
        dismissAmountThresholdsReached = false
        willUnlockWithInWindowLauncherAnimations = false
        willUnlockWithInWindowLauncherAnimations = false
        willUnlockWithSmartspaceTransition = false
        willUnlockWithSmartspaceTransition = false