summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2017-02-02 01:46:13 -0800
committerYohei Yukawa <yukawa@google.com>2017-02-02 01:46:13 -0800
commitddad4b93fac5258e29c0f1d2e871b055cae6e6b8 (patch)
treebe77b92310c353fa7558e0b6b98c9ef19bde78e4 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent82c8e5c9602214e24dd5b6940d2c81bf1d4f6a2c (diff)
Simplify the constructor of InputMethodInfo
This is a preparation CL for fixing Bug 32343335, where we aim to avoid unnecessary reconstruction of InputMethodInfo objects by caching immutable part of those metadata by APK revisions. The reason why we have had to pass additional subtypes not just as List<InputMethodSubtype> but as Map<String, List<InputMethodSubtype>> to create an instance of InputMethodInfo is that how to compute so-called IME ID is not exposed from InputMethodInfo even as @hide method. In practice it has been calculated as new ComponentName(packageName, serviceName).flattenToShortString() and those IDs are already stored here and there including secure settings. It is almost impossible to change the rule anymore hence we should consider them to be a kind of public API. This CL adds a @hide static method InputMethodInfo#computeId() to make it clear. This also enables us to simplify the constructor of InputMethodInfo finally, because we have used IME IDs as keys in subtypes.xml, where additional subtypes are stored. Test: Manually verified that addtional subtypes still work Test: checkbuild Bug: 32343335 Change-Id: I1deaa470e042eac749e7a847933d14448a0d9e03
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions