Toast timeout: Just strip FLAG_KEEP_SCREEN_ON
We added the toast timeout to fix b/21693547. Where the client leaks non visible toasts which end up keeping the screen on. Simply removing the toast windows as we were doing previously, isn't very good though. If the timeout fires when an app could still use the toast (e.g. due to long pause under debugger), the app could crash. It's not obvious how (if even possible without API semantic/guarantee change) to prevent this issue from the client side. Furthermore, #33 at b/21693457 implies that we need to respect FLAG_KEEP_SCREEN_ON even for windows that never submitted a buffer. With time constraints as they are, the only solution I can think of that solves both without chance of regression is just stripping FLAG_KEEP_SCREEN_ON when the timeout fires. Bug: 29105388 Change-Id: Ic2df897f86acf814ea3d4f911a0532d65af0c19f
Loading
Please register or sign in to comment