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

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

Merge "Replace fastUnlockTransition flag with bugfix flag" into main

parents 58436320 a600532d
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -421,10 +421,13 @@ flag {
}
}


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


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


        with(wallpaperCannedUnlockAnimator) {
        with(wallpaperCannedUnlockAnimator) {
            duration = if (fastUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
            duration = if (fasterUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
                    else LAUNCHER_ICONS_ANIMATION_DURATION_MS
                    else LAUNCHER_ICONS_ANIMATION_DURATION_MS
            interpolator = if (fastUnlockTransition()) Interpolators.LINEAR
            interpolator = if (fasterUnlockTransition()) Interpolators.LINEAR
                    else Interpolators.ALPHA_OUT
                    else Interpolators.ALPHA_OUT
            addUpdateListener { valueAnimator: ValueAnimator ->
            addUpdateListener { valueAnimator: ValueAnimator ->
                setWallpaperAppearAmount(valueAnimator.animatedValue as Float)
                setWallpaperAppearAmount(valueAnimator.animatedValue as Float)
@@ -613,7 +613,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
        val isWakeAndUnlockNotFromDream = biometricUnlockControllerLazy.get().isWakeAndUnlock &&
        val isWakeAndUnlockNotFromDream = biometricUnlockControllerLazy.get().isWakeAndUnlock &&
            biometricUnlockControllerLazy.get().mode != MODE_WAKE_AND_UNLOCK_FROM_DREAM
            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
                else LAUNCHER_ICONS_ANIMATION_DURATION_MS
        listeners.forEach {
        listeners.forEach {
            it.onUnlockAnimationStarted(
            it.onUnlockAnimationStarted(
@@ -1148,7 +1148,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
     */
    private fun cannedUnlockStartDelayMs(): Long {
    private fun cannedUnlockStartDelayMs(): Long {
        return if (fastUnlockTransition()) CANNED_UNLOCK_START_DELAY
        return if (fasterUnlockTransition()) CANNED_UNLOCK_START_DELAY
                else LEGACY_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
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
     */
    private fun unlockAnimationDurationMs(): Long {
    private fun unlockAnimationDurationMs(): Long {
        return if (fastUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
        return if (fasterUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
                else LEGACY_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
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
     */
    private fun surfaceBehindFadeOutDurationMs(): Long {
    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
                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
     * TODO (b/298186160) replace references with the constant itself when flag is removed
     */
     */
    private fun surfaceBehindFadeOutStartDelayMs(): Long {
    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
                else LEGACY_UNLOCK_ANIMATION_SURFACE_BEHIND_START_DELAY_MS
    }
    }