diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java index 38b859220256..8a7d7cc69cbb 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java @@ -339,6 +339,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; |