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

Commit 6b9822aa authored by Darrell Shi's avatar Darrell Shi
Browse files

Remove delay of alternate bouncer showing signal during dreams

The delay on the alternateBouncerShowing signal, introduced to address
scrim issue b/339817220, caused a noticeable lag in fingerprint
authentication, especially on phones. This change removes the delay to
improve perceived responsiveness when showing the alternate bouncer over
a dream.

Test: verified that the alternate bouncer appears over dream without a
      noticeable delay
Test: verified that the scrim issue does not resurface on tablets
Fix: 405383897
Bug: 339817220
Flag: EXEMPT bugfix
Change-Id: Iaaad637f85d9af43b947f7dc40e6ad063dc29024
parent d92aa00c
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -267,17 +267,7 @@ constructor(
    @JvmField val primaryBouncerShowing: StateFlow<Boolean> = bouncerRepository.primaryBouncerShow

    /** Whether the alternate bouncer is showing or not. */
    val alternateBouncerShowing: Flow<Boolean> =
        bouncerRepository.alternateBouncerVisible.map { alternateBouncerVisible ->
            if (isAbleToDream.value) {
                // If the alternate bouncer will show over a dream, it is likely that the dream has
                // requested a dismissal, which will stop the dream. By delaying this slightly, the
                // DREAMING->LOCKSCREEN transition will now happen first, followed by
                // LOCKSCREEN->ALTERNATE_BOUNCER.
                delay(600L)
            }
            alternateBouncerVisible
        }
    val alternateBouncerShowing: Flow<Boolean> = bouncerRepository.alternateBouncerVisible

    /** Observable for the [StatusBarState] */
    val statusBarState: StateFlow<StatusBarState> = repository.statusBarState