Fix cancel event sent to wrong back callback
When a callback is registered while a back gesture is in progress, WindowOnBackInvokedDispatcher continues to dispatch the back events to the active callback. It does so even when the newly registered callback ends up being the new top callback in the callback stack. A few code places in WindowOnBackInvokedDispatcher assumed that an active gesture must always be dispatching to the top callback. However, as the previous paragraph explains, that's not always the case. This CL fixes this edge case problem. Bug: 420650888 Test: WindowOnBackInvokedDispatcher Flag: com.android.window.flags.predictive_back_callback_cancellation_fix Change-Id: Iee98ee2222394ec4805c6e689347796771b636eb
Loading
Please register or sign in to comment