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

Commit 52aa9cb3 authored by Felix Stern's avatar Felix Stern
Browse files

Cancel token if no IME control or leash is available

Previously, the statsToken was timing out at PHASE_CLIENT_CONTROL_ANIMATION, when we did not send the requestedVisibleTypes again (2x show), but did also not hold an IME control.

Test: None tests only
Flag: android.view.inputmethod.refactor_insets_controller
Bug: 353463205
Change-Id: I2e2587fc50964b631facd983422fce8081e65fbf
parent 21ba4f2b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2039,8 +2039,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
        } else if (Flags.refactorInsetsController()) {
            if ((typesToReport & ime()) != 0 && mImeSourceConsumer != null) {
                InsetsSourceControl control = mImeSourceConsumer.getControl();
                if (control != null && control.getLeash() == null) {
                    // If the IME was requested twice, and we didn't receive the controls
                if (control == null || control.getLeash() == null) {
                    // If the IME was requested to show twice, and we didn't receive the controls
                    // yet, this request will not continue. It should be cancelled here, as
                    // it would time out otherwise.
                    ImeTracker.forLogging().onCancelled(statsToken,