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

Commit 3d7745ca authored by William Xiao's avatar William Xiao
Browse files

Match alternate bouncer animation duration from hub to lock screen's duration

Previously, it was using our default duration of 1 second. This change
sets the default to 400ms and defines a specific duration for bouncer
animations from the hub.

Bug: 346331245
Fix: 346331245
Test: verified on device
Flag: com.android.systemui.communal_hub
Change-Id: Iba75b7fd2d08184c04fcd403a1b704c9633cd4de
parent ec6079d5
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ constructor(
                when (toState) {
                    KeyguardState.LOCKSCREEN -> TO_LOCKSCREEN_DURATION
                    KeyguardState.OCCLUDED -> TO_OCCLUDED_DURATION
                    KeyguardState.ALTERNATE_BOUNCER -> TO_BOUNCER_DURATION
                    KeyguardState.PRIMARY_BOUNCER -> TO_BOUNCER_DURATION
                    else -> DEFAULT_DURATION
                }.inWholeMilliseconds
        }
@@ -269,8 +271,16 @@ constructor(

    companion object {
        const val TAG = "FromGlanceableHubTransitionInteractor"
        val DEFAULT_DURATION = 1.seconds
        val TO_LOCKSCREEN_DURATION = DEFAULT_DURATION

        /**
         * DEFAULT_DURATION controls the timing for all animations other than those with overrides
         * in [getDefaultAnimatorForTransitionsToState].
         *
         * Set at 400ms for parity with [FromLockscreenTransitionInteractor]
         */
        val DEFAULT_DURATION = 400.milliseconds
        val TO_LOCKSCREEN_DURATION = 1.seconds
        val TO_BOUNCER_DURATION = 400.milliseconds
        val TO_OCCLUDED_DURATION = 450.milliseconds
    }
}