Check embedded windows for IME target

When checking IME target, if the main window can't be IME target but the
embedded window can be, the IME will not be z ordered correctly. The IME
should be updated so it's z ordered to the embedded window. Since the
embedded window is in a different display, we set the IME target to the
host to avoid any issues with IME target being on a different display.

Test: WindowStateTests#testCanWindowWithEmbeddedDisplayBeImeTarget
Test: Host window with flag FLAG_NOT_FOCUSABLE and embedded without. IME
can be shown for the embedded window
Bug: 156785479

Change-Id: Id46dc8be16f1a00dd31d79cc61bfcb83a2515888
2 files changed