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

Commit a600532d authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Replace fastUnlockTransition flag with bugfix flag

Remove the fast_unlock_transition flag and create a bugfix
faster_unlock_transition flag instead.

Flag: com.android.systemui.faster_unlock_transition
Bug: 298186160
Test: presubmit (no logic change)
Change-Id: I9a999d4fe66b79dff27b619eb00323a89cce55da
parent 082fe7bb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -421,10 +421,13 @@ flag {
}

flag {
   name: "fast_unlock_transition"
   name: "faster_unlock_transition"
   namespace: "systemui"
   description: "Faster wallpaper unlock transition"
   bug: "298186160"
   metadata {
     purpose: PURPOSE_BUGFIX
   }
}

flag {
+8 −8
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ import com.android.app.animation.Interpolators
import com.android.internal.R
import com.android.keyguard.KeyguardClockSwitchController
import com.android.keyguard.KeyguardViewController
import com.android.systemui.Flags.fastUnlockTransition
import com.android.systemui.Flags.fasterUnlockTransition
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.flags.FeatureFlags
@@ -363,9 +363,9 @@ class KeyguardUnlockAnimationController @Inject constructor(
        }

        with(wallpaperCannedUnlockAnimator) {
            duration = if (fastUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
            duration = if (fasterUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
                    else LAUNCHER_ICONS_ANIMATION_DURATION_MS
            interpolator = if (fastUnlockTransition()) Interpolators.LINEAR
            interpolator = if (fasterUnlockTransition()) Interpolators.LINEAR
                    else Interpolators.ALPHA_OUT
            addUpdateListener { valueAnimator: ValueAnimator ->
                setWallpaperAppearAmount(valueAnimator.animatedValue as Float)
@@ -613,7 +613,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
        val isWakeAndUnlockNotFromDream = biometricUnlockControllerLazy.get().isWakeAndUnlock &&
            biometricUnlockControllerLazy.get().mode != MODE_WAKE_AND_UNLOCK_FROM_DREAM

        val duration = if (fastUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
        val duration = if (fasterUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
                else LAUNCHER_ICONS_ANIMATION_DURATION_MS
        listeners.forEach {
            it.onUnlockAnimationStarted(
@@ -1148,7 +1148,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
    private fun cannedUnlockStartDelayMs(): Long {
        return if (fastUnlockTransition()) CANNED_UNLOCK_START_DELAY
        return if (fasterUnlockTransition()) CANNED_UNLOCK_START_DELAY
                else LEGACY_CANNED_UNLOCK_START_DELAY
    }

@@ -1157,7 +1157,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
    private fun unlockAnimationDurationMs(): Long {
        return if (fastUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
        return if (fasterUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
                else LEGACY_UNLOCK_ANIMATION_DURATION_MS
    }

@@ -1166,7 +1166,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
    private fun surfaceBehindFadeOutDurationMs(): Long {
        return if (fastUnlockTransition()) SURFACE_BEHIND_FADE_OUT_DURATION_MS
        return if (fasterUnlockTransition()) SURFACE_BEHIND_FADE_OUT_DURATION_MS
                else LEGACY_SURFACE_BEHIND_SWIPE_FADE_DURATION_MS
    }

@@ -1175,7 +1175,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
    private fun surfaceBehindFadeOutStartDelayMs(): Long {
        return if (fastUnlockTransition()) SURFACE_BEHIND_FADE_OUT_START_DELAY_MS
        return if (fasterUnlockTransition()) SURFACE_BEHIND_FADE_OUT_START_DELAY_MS
                else LEGACY_UNLOCK_ANIMATION_SURFACE_BEHIND_START_DELAY_MS
    }