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

Skip to content
Commit f68c0a15 authored by Steve Elliott's avatar Steve Elliott
Browse files

Fix NotifKeyguardViewStateRepo#isPulseExpanding

We were treating the
NotificationWakeUpCoordinator#onPulseExpansionChanged callback as a
notification that expansion has started or stopped, when in reality it
was a notification that the actual expansion progress has changed; the
boolean parameter does not reflect that the expansion is occurring, but
whether or not the _fact_ that an expansion is occuring has changed.

The fix is as follows:

    override fun onPulseExpansionChanged(expandingChanged: Boolean) {
        // Before
        trySend(expandingChanged)
        // After
        if (expandingChanged) trySend(wakeUpCoordinator.isPulseExpanding)
    }

Rather than just fix this in the
NotificationsKeyguardViewStateRepository, the API of
`onPulseExpansionChanged(expandingChanged: Boolean)` is replaced with
the more-idiomatic and (ideally) less error-prone
`onPulseExpandedChanged(isPulseExpanded: Boolean)`, whose boolean
argument specifies the new value of
NotificationWakeUpCoordinator.isPulseExpanding()

Flag: ACONFIG com.android.systemui.notifications_icon_container_refactor DEVELOPMENT
Test: atest SystemUITests
Fixes: 316116909
Change-Id: I8ef78ffd69de3589d1b948df5034d44f51485f7f
parent 4944756c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment