Apply WindowContext 2.0 for InputMethodMenuController
Before WindowContext 2.0, WM creates WindowToken for each
WindowContext. After that, it only creates WindowToken when
WindowContext adss the first view.
Therefore, if InputMethodMenuController invokes getSettingsContext
with different display id before showing the IME switch dialog,
moveWindowTokenToDisplay is no-op because WindowToken with
token switchDialogToken hasn't yet existed. We should re-register
to the different display to receive ImeContainer config changes for
this scenario.
Bug: 159767464
Bug: 153369119
Test: InputMethodMenuControllerTest
Change-Id: Ib9d94a275e1b686535ab3edd7c0c3ce957efd8cd
4 files changed