Fix testGetSettingsContextOnDualDisplayContent flakiness

The test is to verify the window configuration of the IME menu context
(made by createWindowContext from SystemUiContext) is same as the IME
containter's bounds that placed on the given display area,

In case WindowTokenClient#onConfigurationChanged may come after the
server side's configuration change (Since it's the async call),
before calling assertImeSwitchContextMetricsValidity,
we have to verify both server and client side has received the
onConfigurationChanged callback to prevent the test flakiness.

Fix: 215874086
Test: atest InputMethodMenuControllerTest#\
    testGetSettingsContextOnDualDisplayContent --rerun-until-failure 20

Change-Id: Ia915362ff6d81cfb1eb39f426cbf41355c12fa05
1 file changed