Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3370e206 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

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
parent 361ecf28
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment