[SysUI][Floaty][TempFix] Remove window if invocation effect not playing
Issue: (hard to repro) sometimes invocation effect isn't played on power button press Reason: Sometimes, in rare circumstances, rootview attached to window isn't properly cleaned away and on next iteration onwards no new view is being attached to the window due to a check "root == null" before creating and attaching a view to window Current temp fix: * Creates a new state "isInvocationEffectHappening" to keep track of if invocation effect is being played or not * If power button is lifted and invocation effect isn't being played, clean up the window * If power button is lifted but invocation effect is being played, let the window be cleaned up after invocation effect finishes * If due to any reason, window isn't cleaned up even in last point, before we attempt to add window next time, clean last added window * Reset "isInvocationEffectHappening" to false after windows are cleaned up Why not proper fix now? * I am unable to consistently repro it but CL fixes almost all possible causes of this issue * I don't like this solution, but to cleanly fix it might require us to move some logic into VM/repo which might require lot more changes * This unblocks us Teamfood now Bug: 414267753 Test: manual Flag: com.android.systemui.shared.enable_lpp_assist_invocation_effect Change-Id: I5198926318ebe7bc830e7ad39aaaf4e4e0713e80
Loading
Please register or sign in to comment