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
9 files changed