[flexiglass] Make sure scene and userActions are in-sync
Makes sure that the userActions map used for each scene matches that scene exactly. Before this CL, there was a chance that the current scene inside STL and the current scene in the scene stack were not the same. This would cause occasional brief times when the userActions being sent for the current scene was actually the one for the previous scene; which caused a crash, by-design, inside of STL when that scene's builder was called if one of the user actions went to the real current scene. To make them match, the changes actually go to the real scene object for each scene key instead of relying on a flow in the scene stack of classes. Note that, as a side effect, there's a lot more flow collection now as, before this change, SceneContainer tried to only collect from the userActions/sceneDestinations flow of the current scene. This CL changes that to always collect from the flows of all scenes - which is unfortunate but not clear that it creates performance issues. Perhaps if we change the userActions parameter of the scene builder in STL to allow for lazy / provider instead of a direct read it will reduce performance impact. Fix: 349430360 Test: manually verified that the original crash from the bug doesn't happen anymore Test: manually smoked-tested many scene transitions on locked and unlocked device (shade and QS over lockscreen, bouncer, unlock, shade and QS over gone, re-lock, shade and QS) also display on and off Flag: com.android.systemui.scene_container Change-Id: I1348b3aa22090c435bb246fd5e82517a0c32cb7c
Loading
Please register or sign in to comment