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
This commit is contained in:
Adrian Roos
2020-05-25 17:44:55 +02:00
parent b0033693a8
commit a2d2ba7e61

View File

@@ -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);