Handle IME hide internal state correctly. am: e68d6f53ce

Change-Id: I7cef58bf1d7b780b170c6c72a8b65e7b1ff3391b
This commit is contained in:
Taran Singh
2020-03-19 23:24:05 +00:00
committed by Automerger Merge Worker

View File

@@ -878,8 +878,7 @@ public class InputMethodService extends AbstractInputMethodService {
} }
private void notifyImeHidden() { private void notifyImeHidden() {
setImeWindowStatus(IME_ACTIVE | IME_INVISIBLE, mBackDisposition); doHideWindow();
onPreRenderedWindowVisibilityChanged(false /* setVisible */);
} }
private void removeImeSurface() { private void removeImeSurface() {
@@ -2284,7 +2283,9 @@ public class InputMethodService extends AbstractInputMethodService {
if (mDecorViewVisible) { if (mDecorViewVisible) {
// When insets API is enabled, it is responsible for client and server side // When insets API is enabled, it is responsible for client and server side
// visibility of IME window. // visibility of IME window.
if (!isVisibilityAppliedUsingInsetsConsumer()) { if (isVisibilityAppliedUsingInsetsConsumer()) {
mInputView.dispatchWindowVisibilityChanged(View.GONE);
} else {
mWindow.hide(); mWindow.hide();
} }
mDecorViewVisible = false; mDecorViewVisible = false;