[kairos] ensure demo wifi events aren't missed
Unlike the Flow implementation, Kairos' demo mode stack isn't stood up until demo mode is enabled. This means that if a command both enables demo mode *and* sets some demo mode state, the Kairos implementation might miss the state update if it was emitted from a Flow without a replay cache. The fix, other than to rewrite the DemoModeWifiDataSource entirely in Kairos, is to simply keep the Flow alive by ensuring that the downstream Events is always observed. This ensures that the data source's events are seen by Kairos and can be picked up in the same transaction that demo mode is enabled. Bug: 425675342 Test: manual 1. adb shell am broadcast -a com.android.systemui.demo -e command network -e wifi carriermerged -e slot 18 -e level 4 -e numlevels 5 -e inflate false Observe: W+ icon shows w/ 4 out of 4 signal bars Flag: com.android.systemui.status_bar_mobile_icon_kairos Change-Id: If5e333058af4c69b29252e0be7b57e3d4bdc8f4b
Loading
Please register or sign in to comment