diff --git a/core/java/android/view/ImeInsetsSourceConsumer.java b/core/java/android/view/ImeInsetsSourceConsumer.java index f4d5a7b695eba..07d8a1b7312b6 100644 --- a/core/java/android/view/ImeInsetsSourceConsumer.java +++ b/core/java/android/view/ImeInsetsSourceConsumer.java @@ -68,8 +68,14 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { } @Override - void hide(boolean animationFinished, @AnimationType int animationType) { + public void hide() { super.hide(); + mIsRequestedVisibleAwaitingControl = false; + } + + @Override + void hide(boolean animationFinished, @AnimationType int animationType) { + hide(); if (animationFinished) { // remove IME surface as IME has finished hide animation. @@ -126,6 +132,9 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { hide(); removeSurface(); } + if (control != null) { + mIsRequestedVisibleAwaitingControl = false; + } } @Override