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

Commit 99b1f67d authored by Matt Pietal's avatar Matt Pietal
Browse files

Blind fix for flashing lockscreen/bouncer

It looks like the swipe up to show bouncer is being immediately
canceled. Since the values can overlap, don't start the transition
to bouncer until it is >0f and <1f.

Fixes: 365700803
Test: manual - drag up for bouncer
Flag: com.android.systemui.migrate_clocks_to_blueprint
Change-Id: Icae6a140b21ffb4c4a5c7025044f570973c5be97
parent 69243320
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ constructor(
            .transition(
                edge = Edge.create(from = KeyguardState.LOCKSCREEN, to = Scenes.Gone),
                edgeWithoutSceneContainer =
                    Edge.create(from = KeyguardState.LOCKSCREEN, to = KeyguardState.GONE)
                    Edge.create(from = KeyguardState.LOCKSCREEN, to = KeyguardState.GONE),
            )
            .map<TransitionStep, Boolean?> {
                true // Make the surface visible during LS -> GONE transitions.
@@ -162,7 +162,7 @@ constructor(
                .collect {
                    startTransitionTo(
                        KeyguardState.PRIMARY_BOUNCER,
                        ownerReason = "#listenForLockscreenToPrimaryBouncer"
                        ownerReason = "#listenForLockscreenToPrimaryBouncer",
                    )
                }
        }
@@ -238,7 +238,7 @@ constructor(
                                            getDefaultAnimatorForTransitionsToState(
                                                    KeyguardState.LOCKSCREEN
                                                )
                                                .apply { duration = 0 }
                                                .apply { duration = 0 },
                                    )
                                )
                            }
@@ -249,6 +249,8 @@ constructor(
                        if (
                            // Use currentTransitionInfo to decide whether to start the transition.
                            currentTransitionInfo.to == KeyguardState.LOCKSCREEN &&
                                shadeExpansion > 0f &&
                                shadeExpansion < 1f &&
                                shadeRepository.legacyShadeTracking.value &&
                                !isKeyguardUnlocked &&
                                statusBarState == KEYGUARD
@@ -257,7 +259,7 @@ constructor(
                                startTransitionTo(
                                    toState = KeyguardState.PRIMARY_BOUNCER,
                                    animator = null, // transition will be manually controlled,
                                    ownerReason = "#listenForLockscreenToPrimaryBouncerDragging"
                                    ownerReason = "#listenForLockscreenToPrimaryBouncerDragging",
                                )
                        }
                    }