Loading
Prevent custom IME back callbacks from "leaking" in app process
This CL ensures that no custom IME back callback can remain registered in the app process when the default (system) IME callback is not registered. ImeOnBackInvokedDispatcher does not send any registration requests to the app process while there is no system back callback registered by the IME process. Additionally, it unregisters any remaining non-system IME back callbacks when the system callback is unregistered. Furthermore, whenever the target ImeOnBackInvokedDispatcher changes, any registered non-system back callbacks are transferred to the new dispatcher. Bug: 420870283 Test: KeyboardVisibilityControlTest Flag: com.android.window.flags.ime_back_callback_leak_prevention Change-Id: I2d935efe13c5e7e033ec87933a7c9da2a63f5bae