Introduce InputMethodInfoUtils and SubTypeUtils
This is the first refactoring CL to clean up InputMethodUtils with moving some util methods regarding filtering IME info to a new dedicated class for easier maintaince: - getDefaultEnabledImes - isSystemImeThatHasSubtypeOf (make it as private method) - chooseSystemVoiceIme - getMostApplicableDefaultIME - getFallbackLocaleForDefaultIme (make it as private method) - SEARCH_ORDER_OF_FALLBACK_LOCALES (make it as private field) - ENGLISH_LOCALE (make it as private field) Also clean up other dependencies fields / methods in InputMethodUtils that related to the above methods to the new added SubTypeUtils and LocaleUtils class. SubTypeUtils: - SUBTYPE_MODE_ANY - SUBTYPE_MODE_KEYBOARD - containsSubtypeOf LocaleUtils: - getLanguageFromLocaleString - getSystemLocaleFromContext This is a machanical refactoring CL and it should not have additional behavior change. Bug: 235661780 Test: build Test: atest CtsInputMethodTestCases InputMethodUtilTests Change-Id: I7ebea2d606fea0c2d5404b12d611964103bc34d3
Loading
Please register or sign in to comment