[kairos] Fix casting error in ActivatedKairosSpec
The `uninit` value is used as a sentinel to determine if the kairos spec is currently active. If the state is not the same instance as `uninit`, then we know that it is the value returned from the spec activation, and so we can safely cast it. The bug: `uninit` is a different instance when recomponsing, and so the instance equality check fails, even though the value is *not* an instance of `T`. This causes the cast to fail, which crashes the process. The solution: make `uninit` a private singleton that lives outside of the composition. There will only ever be a single instance, and so the instance equality check will now suffice. Flag: com.android.systemui.status_bar_mobile_icon_kairos Bug: 383172066 Change-Id: I57d06aba0e6d5b11ee13990eb78f7065314a5500
Loading
Please register or sign in to comment