WindowInsetsAnimation: Fix app driven closing of IME

When using controlWindowInsetsAnimation to close the IME,
delay reporting this to the IME until the animation is actually
finished. Otherwise, the IME will self-hide and start a transition
that breaks the just-begun app-driven transition.

(Regression from I7f6098a61a5942795ffd33a60329e4dd5fb5d6cb which
changed InputMethodService to hide itself in reponse to notifyHidden)

Bug: 151980214
Test: make WindowInsetsTests, ensure that dragging the IME closed doesnt get cancelled
Change-Id: If4e64cc78742a4e1e8c98137bd97d65dd567f674
(cherry picked from commit 3b19ff1e0f7a0c8b180c91e4227db48ab40c03af)
1 file changed