Remove duplicate code from InputMethodUtils
This is a follow up CL to my CL [1], which originally aimed to revert
the CL [2] that added several methods into InputMethodUtils but could
not because those methods were already used in other places.
Interestingly we already have almost the same code in
InputMethodAndSubtypeUtil in SettingsLib package on which those other
projects can depend on. Hence this CL removes InputMethodUtils' ones
to avoid code duplication.
Although in future we may move the logic back to framework internal,
at the moment it is more important to reduce code duplication.
Note that this CL also ports existing test cases for those two
functions from FrameworksCoreTests to RunSettingsLibRoboTests in
GoogleTruth style.
[1]: I122a8f69b2f75a9af85e14b66db764c5d153040e
ca7809507c3b40a6eb47e7dd8822744d5901254c
[2]: I01f5fafbbcfe3e3f5313829162ec011eaf2ad991
2028ddaa5024dfc9844376f2032115aee360155a
Fixes: 73056657
Test: atest InputMethodUtilsTest
Test: make RunSettingsLibRoboTests -j
Test: prebuilts/checkstyle/checkstyle.py -f frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/inputmethod/InputMethodAndSubtypeUtilTest.java
Change-Id: Iad926ffd9806482a5aef0d8c20d2049be40d03c9
4 files changed