Fix swipe to hub sometimes not working
The hub ignores all touches when the shade is open as touches in empty
portions of the shade seem to fall through directly to our view without
going through any of our other touch handling logic. However we were
not using a StateFlow and set the initial value to false, meaning that
if the shade flow didn't update once the hub became available, touches
would be ignored. The flow seems to update most of the time when
locking or entering the dream, but it is not guaranteed.
This changes the flow in our ViewModel to a StateFlow and initializes
the variable in the composable using the StateFlow's value instead of
always false.
Bug: 349200647
Fix: 349200647
Test: manually verified that swiping to open the hub after pressing
power to start dream works repeatedly, and that touchesAllowed
has the right value once dreaming starts
Flag: com.android.systemui.communal_hub
Change-Id: Ic5503632db231f2a82a5a4bb24ecdff74d65f198
Loading
Please register or sign in to comment