Skip to content

Commit c0c8765

Browse files
committed
Skip the exit animation when the IME is destroyed.
Bug: 4529563 Change-Id: I6fb2ea3601e1cc6fa8858d006819698dcabdd5ca
1 parent f4b783f commit c0c8765

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/java/android/inputmethodservice/InputMethodService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,10 @@ void initViews() {
687687
mRootView.getViewTreeObserver().removeOnComputeInternalInsetsListener(
688688
mInsetsComputer);
689689
if (mWindowAdded) {
690+
// Disable exit animation for the current IME window
691+
// to avoid the race condition between the exit and enter animations
692+
// when the current IME is being switched to another one.
693+
mWindow.getWindow().setWindowAnimations(0);
690694
mWindow.dismiss();
691695
}
692696
}

0 commit comments

Comments
 (0)