summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/InsetsController.java5
-rw-r--r--core/java/android/view/InsetsResizeAnimationRunner.java3
2 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index 1dd5a1b57c53..71c1b7c47a9f 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -1266,6 +1266,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
public void notifyFinished(InsetsAnimationControlRunner runner, boolean shown) {
cancelAnimation(runner, false /* invokeCallback */);
if (DEBUG) Log.d(TAG, "notifyFinished. shown: " + shown);
+ if (runner.getAnimationType() == ANIMATION_TYPE_RESIZE) {
+ // The resize animation doesn't show or hide the insets. We shouldn't change the
+ // requested visibility.
+ return;
+ }
if (shown) {
showDirectly(runner.getTypes(), true /* fromIme */);
} else {
diff --git a/core/java/android/view/InsetsResizeAnimationRunner.java b/core/java/android/view/InsetsResizeAnimationRunner.java
index e1352dd8dd4f..edcfc95fe4e4 100644
--- a/core/java/android/view/InsetsResizeAnimationRunner.java
+++ b/core/java/android/view/InsetsResizeAnimationRunner.java
@@ -131,6 +131,9 @@ public class InsetsResizeAnimationRunner implements InsetsAnimationControlRunner
@Override
public boolean applyChangeInsets(InsetsState outState) {
+ if (mCancelled) {
+ return false;
+ }
final float fraction = mAnimation.getInterpolatedFraction();
for (@InternalInsetsType int type = 0; type < InsetsState.SIZE; type++) {
final InsetsSource fromSource = mFromState.peekSource(type);