diff --git a/core/java/android/view/ImeInsetsSourceConsumer.java b/core/java/android/view/ImeInsetsSourceConsumer.java index 98b7dbfa670fc..8db6456c0380e 100644 --- a/core/java/android/view/ImeInsetsSourceConsumer.java +++ b/core/java/android/view/ImeInsetsSourceConsumer.java @@ -64,8 +64,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. @@ -122,6 +128,9 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer { hide(); removeSurface(); } + if (control != null) { + mIsRequestedVisibleAwaitingControl = false; + } } @Override