summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2018-12-24 19:43:17 -0800
committerYohei Yukawa <yukawa@google.com>2018-12-24 19:43:17 -0800
commitfefedc52bb5ed00759cb280f1f15d7cb44b7f4cf (patch)
treeeae0121c2905ed1636bab9320017ad59e55e1b62 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent86e2377a59c3a6a822b860e3b70fad9e6ecabff7 (diff)
Re-work IMM#getShortcutInputMethodsAndSubtypes()
It seems that InputMethodManager#getShortcutInputMethodsAndSubtypes() was designed to be a bit more generalized concept, but in reality it just ended up being a convenient API that returns a single Voice IME subtype if exists. As far as we can tell, It has never returned two or mode pairs. It also has never returned non-voice InputMethodSubtype. In order to support per-profile IME mode in InputMethodManagerService without introducing a bunch of new complexity and technical debt, this CL re-implements IMM#getShortcutInputMethodsAndSubtypes() based on how it has been used actually in the ecosystem. The first thing this CL changes is that IMM#getShortcutInputMethodsAndSubtypes() no longer takes subtype locale into account when looking for the best voice IME subtype. This is because InputMethodSubtype is no longer a recommended way to represent IME languages. Ignoring subtype locale makes the implementation much easier to understand and maintain. The second thing this CL changes is that IMM#getShortcutInputMethodsAndSubtypes() is now just a utility method that is implemented in the client side on top of other well-defined public APIs such as IMM#getEnabledInputMethodList() and IMM#getEnabledInputMethodSubtypeList(). This means that this API becomes per-profile IME ready for free once other public APIs become per-profile IME ready. [1]: Ibd0f7ef5101013569c303820a3adc9038a97356d 4e4569dab5c75804b01a19b2d6e6101b445c1c68 Bug: 120709962 Test: AOSP Keyboard still shows voice IME shortcut when the device has one or more IMEs that expose voice InputMethodSubtype. Change-Id: Iaf31e9f3213f4e644b64c9658f1b59d371e3c2b4
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions