Handle IME hide internal state correctly.

IME process is notified after client has hidden the IME. At this point
IME should call doHideWindow() so internal lifecycle methods are called
the way they were called earlier.
Also, with insets we don't hide the decorView of IME window till client
is unbound, so to be consistent with previous behavior, call
windowVisibilityChanged(View.GONE) explicitly.

Fix: 151125925
Test: atest KeyboardVisibilityTest InputMethodServiceTest
Change-Id: Ibe9a02b93489370b6ae9b497993e366f88791a62
1 file changed