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

Skip to content
Commit 5c465d5b authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Introduce STLState.currentTransitions: List<TransitionState>

This CL adds the foundation for interruptions in STL: multiple
transitions can now run in parallel. This means that the state is now
either Idle or List<Transition>. However, for backward compatibility,
the old API is preserved and this CL exposes a new currentTransitions
list that can be used by consumers that want to handle interruptions.
For the current callers, STLState.currentTransition still represents the
last/current transition and the behavior is unchanged.

This is mostly a pure refactoring that should not have any impact on
current usages, but there is an important change: transitions now *have
to* call STLState.finishTransition() once they are finished, even if
they are not the last/current transition. This change only impacts
library STL code and not consumer code given that user code is not
supposed to create custom Transitions (yet).

This CL introduces a flag to disable interruptions. This flag is enabled
by default so that the tests cover the new code, but it is explicitly
disabled in current production usages (Flexiglass, Bouncer, Lockscreen,
Communal). It is enabled by default in the STL demo app.

See b/290930950#comment5 for more information about the upcoming
interruptions support.

Bug: 290930950
Test: atest SceneTransitionLayoutStateTest
Test: Ran all STL tests with both values for the interruptions flag
Flag: N/A

Change-Id: Ia6669cc6d305b2f17ee9a805082f0b7bda56f06e
parent 6141b370
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