Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d788378e authored by Felix Stern's avatar Felix Stern Committed by Android (Google) Code Review
Browse files

Merge "Fix test: Do not assert that currentInputStarted flag is set after hiding the IME" into main

parents 570e59da 4d0dc576
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -159,15 +159,16 @@ public class InputMethodServiceTest {

        // Press home key to hide soft keyboard.
        Log.i(TAG, "Press home");
        verifyInputViewStatus(
                () -> assertThat(mUiDevice.pressHome()).isTrue(),
                true /* expected */,
                false /* inputViewStarted */);
        if (Flags.refactorInsetsController()) {
            assertThat(mUiDevice.pressHome()).isTrue();
            // The IME visibility is only sent at the end of the animation. Therefore, we have to
            // wait until the visibility was sent to the server and the IME window hidden.
            eventually(() -> assertThat(mInputMethodService.isInputViewShown()).isFalse());
        } else {
            verifyInputViewStatus(
                    () -> assertThat(mUiDevice.pressHome()).isTrue(),
                    true /* expected */,
                    false /* inputViewStarted */);
            assertThat(mInputMethodService.isInputViewShown()).isFalse();
        }
    }