Loading services/tests/InputMethodSystemServerTests/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ android_test { "androidx.test.espresso.core", "androidx.test.ext.truth", "androidx.test.runner", "cts-input-lib", "cts-wm-util", "frameworks-base-testutils", "mockito-target-extended-minus-junit4", Loading services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java +2 −8 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.inputmethodservice; import static android.view.WindowInsets.Type.captionBar; import static com.android.compatibility.common.util.SystemUtil.eventually; import static com.android.cts.input.injectinputinprocess.InjectInputInProcessKt.clickOnViewCenter; import static com.android.internal.inputmethod.InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR; import static com.android.internal.inputmethod.InputMethodNavButtonFlags.SHOW_IME_SWITCHER_WHEN_IME_IS_SHOWN; Loading Loading @@ -77,7 +78,6 @@ public class InputMethodServiceTest { private static final String TAG = "SimpleIMSTest"; private static final String INPUT_METHOD_SERVICE_NAME = ".SimpleInputMethodService"; private static final String EDIT_TEXT_DESC = "Input box"; private static final String INPUT_METHOD_NAV_BACK_ID = "android:id/input_method_nav_back"; private static final String INPUT_METHOD_NAV_IME_SWITCHER_ID = Loading Loading @@ -168,7 +168,7 @@ public class InputMethodServiceTest { // Performs click on EditText to bring up the IME. Log.i(TAG, "Click on EditText"); verifyInputViewStatus( this::clickOnEditText, () -> clickOnViewCenter(mActivity.getEditText()), true /* expected */, true /* inputViewStarted */); assertWithMessage("IME is shown").that(mInputMethodService.isInputViewShown()).isTrue(); Loading Loading @@ -1260,10 +1260,4 @@ public class InputMethodServiceTest { controller.hide(captionBar()); } } private void clickOnEditText() { // Find the editText and click it. getUiObject(By.desc(EDIT_TEXT_DESC)).click(); mInstrumentation.waitForIdleSync(); } } services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/testing/TestActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public final class TestActivity extends Activity { getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); final var rootView = new LinearLayout(this); mEditText = new EditText(this); mEditText.setContentDescription("Input box"); mEditText.setHint("editText"); rootView.addView(mEditText, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); rootView.setFitsSystemWindows(true); setContentView(rootView); Loading Loading
services/tests/InputMethodSystemServerTests/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ android_test { "androidx.test.espresso.core", "androidx.test.ext.truth", "androidx.test.runner", "cts-input-lib", "cts-wm-util", "frameworks-base-testutils", "mockito-target-extended-minus-junit4", Loading
services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java +2 −8 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.inputmethodservice; import static android.view.WindowInsets.Type.captionBar; import static com.android.compatibility.common.util.SystemUtil.eventually; import static com.android.cts.input.injectinputinprocess.InjectInputInProcessKt.clickOnViewCenter; import static com.android.internal.inputmethod.InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR; import static com.android.internal.inputmethod.InputMethodNavButtonFlags.SHOW_IME_SWITCHER_WHEN_IME_IS_SHOWN; Loading Loading @@ -77,7 +78,6 @@ public class InputMethodServiceTest { private static final String TAG = "SimpleIMSTest"; private static final String INPUT_METHOD_SERVICE_NAME = ".SimpleInputMethodService"; private static final String EDIT_TEXT_DESC = "Input box"; private static final String INPUT_METHOD_NAV_BACK_ID = "android:id/input_method_nav_back"; private static final String INPUT_METHOD_NAV_IME_SWITCHER_ID = Loading Loading @@ -168,7 +168,7 @@ public class InputMethodServiceTest { // Performs click on EditText to bring up the IME. Log.i(TAG, "Click on EditText"); verifyInputViewStatus( this::clickOnEditText, () -> clickOnViewCenter(mActivity.getEditText()), true /* expected */, true /* inputViewStarted */); assertWithMessage("IME is shown").that(mInputMethodService.isInputViewShown()).isTrue(); Loading Loading @@ -1260,10 +1260,4 @@ public class InputMethodServiceTest { controller.hide(captionBar()); } } private void clickOnEditText() { // Find the editText and click it. getUiObject(By.desc(EDIT_TEXT_DESC)).click(); mInstrumentation.waitForIdleSync(); } }
services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/testing/TestActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ public final class TestActivity extends Activity { getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); final var rootView = new LinearLayout(this); mEditText = new EditText(this); mEditText.setContentDescription("Input box"); mEditText.setHint("editText"); rootView.addView(mEditText, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); rootView.setFitsSystemWindows(true); setContentView(rootView); Loading