DisplayImeController: fix out-of-sync IME visibility

Fixes an issue where the DisplayImeController would disagree with
the InputMethodManagerService about the visibility of the IME.

Currently, the Insets component is supposed to execute the
visibility as dictated by IMMS; however, when the DisplayImeController
became the control target, previously it would just apply the IME
visibility that was last requested of it - regardless of the
changes to it that may have happened while it was not the control
target.

Eventually, IME visibility should be driven by the requested IME
inset visibility of the focused window, instead of the separate
dispatch we have now from IMMS.

Bug: 167780081
Test: atest DisplayImeControllerTest ImeInsetsSourceProviderTest
Change-Id: I1f140af6bcccbcbe6efb2fde9a789ac4c7bd127f
8 files changed