diff options
| author | 2024-12-09 19:20:46 +0000 | |
|---|---|---|
| committer | 2024-12-09 19:20:46 +0000 | |
| commit | f6e05b68acb934eb86812a30aae05db1f777ee7c (patch) | |
| tree | 13ed3647553361460c2d0a3fc135d6a7cde22cb1 | |
| parent | d8dacaf6582c007dd1d69027c36bd1ee4b192f15 (diff) | |
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
| -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; |