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

Skip to content
Commit 3b282f6a authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Introducing GestureUiState with extra animation info

We need more info in GestureState that is UI-specific so instead of adding it there, let's add extra layer between ActionState (state for touchpad + keyboard tutorial) and GestureState (formerly state for touchpad tutorial).
Because we need to do do different mapping for each touchpad gesture, introduced GestureFlowAdapter that wraps callback code into flow - this makes it less repetitive (and error prone) and we can subscribe it to it easily from Compose code.

Using conflatedCallbackFlow enforces using awaitClose() so also added new method to clear callback - it shouldn't be needed because we subscribe only when creating new GestureRecognizer but just to make it more explicit there's no memory leak.

Bug: 369817369
Test: small refactoring, tests pass
Flag: com.android.systemui.shared.new_touchpad_gestures_tutorial
Change-Id: I0e9536af9a0fe475807721838383ad5cbe3912a3
parent 81c6cdc7
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