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

Commit 67b82459 authored by Felix Stern's avatar Felix Stern Committed by Android Build Coastguard Worker
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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f6e05b68acb934eb86812a30aae05db1f777ee7c)
Merged-In: Ic0878dadd1550d96c845f3587d7b84c41697a77e
Change-Id: Ic0878dadd1550d96c845f3587d7b84c41697a77e
parent 843108fd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -338,6 +338,11 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
            // Make mImeSourceControl point to the new control before starting the animation.
            if (hadImeSourceControl && mImeSourceControl != imeSourceControl) {
                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;