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

Commit f6e05b68 authored by Felix Stern's avatar Felix Stern
Browse files

Cancel animation in split screen, if the leash is lost

Test: manual: quickly hide and show the IME in split screen
Fix: 382184754
Flag: android.view.inputmethod.refactor_insets_controller
Change-Id: Ic0878dadd1550d96c845f3587d7b84c41697a77e
parent d8dacaf6
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -339,6 +339,11 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
            // Make mImeSourceControl point to the new control before starting the animation.
            // Make mImeSourceControl point to the new control before starting the animation.
            if (hadImeSourceControl && mImeSourceControl != imeSourceControl) {
            if (hadImeSourceControl && mImeSourceControl != imeSourceControl) {
                mImeSourceControl.release(SurfaceControl::release);
                mImeSourceControl.release(SurfaceControl::release);
                if (android.view.inputmethod.Flags.refactorInsetsController()
                        && !hasImeLeash && mAnimation != null) {
                    // In case of losing the leash, the animation should be cancelled.
                    mAnimation.cancel();
                }
            }
            }
            mImeSourceControl = imeSourceControl;
            mImeSourceControl = imeSourceControl;