Fix showing the IME from EmbeddedWindow

- With the refactor in [1], the IME does not show, when requested from EmbeddedWindow.
- This CL introduces a new parent interface (InsetsTarget) for InsetsControlTarget and InputType. However, an EmbeddedWindow may not be a controlTarget, as it should not be able to control other insets types, except of the IME.
- Previously the initiallyVisible of an IME control was always false [2]. This will now take into account, whether there was an ongoing transition (e.g., in case of app -> Launcher, in this case it is not initiallyVisible), or otherwise whether it is is client- and serverVisible (otherwise it cannot be currently be shown).
- The leash was hidden in InsetsSourceProvider.ControlAdapter#startAnimation, which is due to this change also not needed anymore (otherwise the leash could have a different visibility than given in initiallyVisible).
- DisplayImeController was not using initiallyVisible, but uses it now to update its own imeVisible state and start an animation, if necessary.

[1]: I8e3a74ee579f085cb582040fdba725e7a63d6b85
[2]: I459debedb243b4345b9981b88adf6e4a0ea9b44a

Test: atest CtsSurfaceControlTests:android.view.surfacecontrol.cts.SurfaceControlViewHostTests#testImeVisible
Flag: android.view.inputmethod.refactor_insets_controller
Fix: 355047142
Change-Id: I5aeb3ccfbfe7d4cd0b7b5f0e0400769e65bb70a4
14 files changed