Greetings!
I am in the process of creating unit tests relating to IMEs, and therefore would like to make use of the
ShadowInputMethodManager class. The unit tests are built and run from the command line, using an Android.bp file. I believe I have all the imports set up correctly, as the project compiles with the following code:
iMM = (InputMethodManager)
ApplicationProvider.getApplicationContext()
.getSystemService(Activity.INPUT_METHOD_SERVICE);
shadowIMM = Shadows.shadowOf(iMM);Yet, the following code, when added, will
not compile:
InputMethodInfo inputMethodInfo =
new InputMethodInfo("pkg", "ClassName", "customIME", "customImeSettingsActivity");
shadowIMM.setEnabledInputMethodInfoList(ImmutableList.of(inputMethodInfo));
List<InputMethodInfo> imiList = shadowIMM.getInputMethodList();
For example: error: cannot find symbol
mShadowIMM.setEnabledInputMethodInfoList(ImmutableList.of(inputMethodInfo));
Anything obvious I missed that would explain this? Please let me know what other information is required to answer this.
Regards,
Rick Mutzke