diff options
author | 2020-05-25 17:44:55 +0200 | |
---|---|---|
committer | 2020-05-26 20:22:05 +0000 | |
commit | a2d2ba7e6192a44bbd6449d98df3c46b66d75252 (patch) | |
tree | fef7ae5ffbd8da594713a9fffbb9f114aa4b28ce | |
parent | b0033693a89923a80f9973e41b45ddcef2ec7ae9 (diff) |
InsetsController: Maintain type user animation when restarting input
When the IME restarts input, it re-requests to show itself. If the app is
already animating, we should maintain that animation instead of cancelling
it.
Fixes: 155962435
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I57618e43b2cddc55e5dfc32111abbbd82cc6ed48
-rw-r--r-- | core/java/android/view/InsetsController.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java index 758062f41428..9296618daac5 100644 --- a/core/java/android/view/InsetsController.java +++ b/core/java/android/view/InsetsController.java @@ -713,6 +713,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation // applied before starting animation). continue; } + if (fromIme && animationType == ANIMATION_TYPE_USER) { + // App is already controlling the IME, don't cancel it. + continue; + } typesReady |= InsetsState.toPublicType(consumer.getType()); } applyAnimation(typesReady, true /* show */, fromIme); |