[flexiglass] rememberViewModel uses lifecycle
Defaults to STARTED, which is more than CREATED and less than RESUMED. Without passing anything in, this means that content that's always composed (which stays in CREATED while invisible and switches to RESUMED when visible), will only activate view-models once visible, by default. The caller of rememberViewModel can override with CREATED (so even invisible content activates the view-model), as needed. Note the quasi-telescoping approach where we now have several flavours of rememberViewModel, each one taking a combination of minActiveState and key. This makes sure that this change is forward compatible (as only some callers currently pass a key but most don't) while also freeing new callers to pass only minActiveState or both - all without confusing the compiler to mistake minActiveState for the key. Fix: 432549544 Test: manually verified that restarting the phone or crashing and restarting System UI no longer snaps to QS, even if it's always composed Test: manually verified that QS scene and overlay are both interactive (respond to touch) when alwaysCompose=true for them (see followup CL) Flag: com.android.systemui.scene_container Change-Id: I8c5e524e3bb110cb477f255601268c40d997e9ce
Loading
Please register or sign in to comment