Propagate setImeWindowStatus() to WMS

setImeWindowStatus() introduced in the previous CL [1] can help
WindowManagerService (WMS) address Bug 34628091.  As a preparation
this CL has InputMethodManagerService propagate relevant information
to WMS WMS for later use.

 [1]: I9921b381e02106dbffff5e0b3d13f0a1245ce807
      db2afde0e584904ee4ce115ce176a4dfe1773990

Test: Verified the callback in WindowManagerService as follows:
       1. Rebuild the system with DEBUG_INPUT_METHOD=true
       2. adb logcat -s WindowManager:*
            to make sure the visibility passed to
            WindowManagerService#updateInputMethodWindowStatus matches
            to the actual IME window visibility
Bug: 34628091
Bug: 35079353
Change-Id: I54fb1faf513883a54293a756e4c9d2ae9453d778
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index b6a0e5c..1dadcf5 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -1856,8 +1856,9 @@
             return;
         }
 
+        final StartInputInfo info;
         synchronized (mMethodMap) {
-            final StartInputInfo info = mStartInputMap.get(startInputToken);
+            info = mStartInputMap.get(startInputToken);
             if (info == null) {
                 throw new InvalidParameterException("Unknown startInputToken=" + startInputToken);
             }
@@ -1865,6 +1866,8 @@
             mBackDisposition = backDisposition;
             updateSystemUiLocked(token, vis, backDisposition);
         }
+        mWindowManagerInternal.updateInputMethodWindowStatus(info.mImeToken,
+                (vis & InputMethodService.IME_VISIBLE) != 0, info.mTargetWindow);
     }
 
     private void updateSystemUi(IBinder token, int vis, int backDisposition) {