summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2024-05-30 23:30:22 +0900
committer Yohei Yukawa <yukawa@google.com> 2024-05-30 23:30:22 +0900
commit67bd9adf5972c9020b789c6deb7d99baedb7a7d5 (patch)
tree270c09e5c456783917ea5ff6603832a36a126e70 /api/api.go
parent61ed776f5f47368d562eefd41bd89accbcc435ce (diff)
Offload I/O writes to a bg thread in AdditionalSubtypeMapRepository
This is a part of our on-going effort to ensure that slow I/O operations will not block the entire system in InputMethodManagerService (Bug 343601565). This CL introduces a dedicated worker thread to enable AdditionalSubtypeMapRepository to A. reduce potential lock contentions and the risk of ANRs around ImfLock.class due to slow I/O. B. merge multiple write operations into a single write operation. without changing user-observable semantics. Of course there is a risk that additional subtypes can be lost if the system_server is unexpectedly rebooted before the pending write operations are fulfilled, but the overall benefits are supposed to be much larger than such a risk, which can be easily recovered when the IME calls InputMethodManager#setAdditionalInputMethodSubtypes() again. Bug: 341158961 Test: presubmit Test: Manually verified as follows 1. Build aosp_cf_x86_64_only_phone-trunk_staging-eng and run it 2. Wait until the device fully boots up 3. adb reboot # to avoid Bug 121259290 4. adb root 5. adb shell "abx2xml /data/system/inputmethod/subtypes.xml -" -> make sure the content looks as follows: <subtypes> <imi id="com.android.inputmethod.latin/.LatinIME"> <subtype ....> <subtype ....> </imi/> </subtypes> 6. Open AOSP Keyboard settings 7. Go to "Appearance & Layouts" -> "Custom input styles" 8. Remove all layouts 9. adb shell "abx2xml /data/system/inputmethod/subtypes.xml -" -> make sure the file no longer exists 10. adb shell ls /data/system/inputmethod -> make sure the directory no longer exists 11. adb reboot 12. adb logcat -s InputMethodManagerService:* -> no error message about /data/system/inputmethod 13. Open AOSP Keyboard settings 14. Go to "Appearance & Layouts" -> "Custom input styles" 15. Add English (US) - Dvorak 16. adb shell ls /data/system/inputmethod -> make sure the directory exists and only the system user can access it Change-Id: If51063a272317907505964cf2947e239661cc4ae
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions