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

Commit 0cec81d7 authored by Steve Elliott's avatar Steve Elliott
Browse files

[kairos] optimize StateScope.takeUntil

Previously, takeUntil (and nextOnly) would die once the stop signal
emitted. If the signal being truncated ends *before* the stop signal
emits, then takeUntil would remain alive; Kairos has no way of knowing
that the stop signal wouldn't switch-in a different, live Events.

This change optimizes takeUntil so that it dies once the stop signal
emits, *or* if the truncated events dies, whichever occurs first. This
is accomplished by leveraging the internal lifetime management of state
scopes, which is implemented specifically for efficiently tracking stop
signals.

Flag: com.android.systemui.status_bar_mobile_icon_kairos
Bug: 383172066
Test: atest
Change-Id: I3d379efb377c2bdb6e6ae333aca4534a4a6cce4f
parent 81fce469
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment