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

Skip to content
Commit df6c7810 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

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
parent 5c91bf2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment