summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2024-06-26 20:31:17 +0000
committer Yohei Yukawa <yukawa@google.com> 2024-06-26 20:31:17 +0000
commit182f0eba6b6ab6cb8a7f5be1321bcdb1497d90b6 (patch)
tree3b4458738f0eba4dd45a7ab4df76e4e1d43a8f3e /libs/androidfw/StringPool.cpp
parent0bf84c39af37f72cf7e181f3e596b53366cda331 (diff)
Update a stale comment in IMMS constructor
This is a follow up CL to my previous CL [1] 7 years ago, which was part of our effort on speeding up the system boot process by postponing unnecessary tasks from InputMethodManagerService's constructor to later phases. Here is a brief history of the comment in question // InputMethodSettingsRepository should be initialized before // buildInputMethodListLocked It was added on Oct 2010 when InputMethodSettings was introduced [2]. At that time, the code was as follows. // mSettings should be created before buildInputMethodListLocked mSettings = new InputMethodSettings( context.getContentResolver(), mMethodMap, mMethodList); buildInputMethodListLocked(mMethodList, mMethodMap); mSettings.enableAllIMEsIfThereIsNoEnabledIME(); The comment was a bit redundant but was not inconsistent at least. After my CL [1], we no longer call buildInputMethodListLocked from the IMMS constructor, and that's when the comment became stale. Ideally I should have updated the comment alongside. The next chance I could have updated the comment was when I decided to not reuse the same instance in InputMethodManagerService#mSettings but rather re-create a new instance every time it needed to be updated [3]. After that CL [3], it became more obvous that IMMS#mSettings remains to be empty until the system hits IMMS#systemReady(). It was already the case even before that CL [3] though. Finally I have replaced InputMethodManagerService#mSettings in favor of InputMethodSettingsRepository [4], with mechanically replacing this stale and confusing comment without thinking twice whether the comment was still valid or not. We may probably revisit the behavior of InputMethodSettingsRepository.initialize() in a subsequent CL, as it still has some questionable logic, but I believe the revised comment in this CL would remain valid at least for a while. This is just a comment change. There must be no behavior change. [1]: I5b37c450db4b25b3e635b6d634293a34eec8b9d4 7924782c000733b2d7a180701b74988f0154adee [2]: Icd0f13de396ce286ff6563e8c2775d53bcdacbf3 d87c2594c688b4ed8fc9c14053abfbc5ea87fb5e [3]: I52297912d0b66e5e40b6a624c35427a377dc7b1b a56463ba88a0513125942ca25f92e7759ca069ca [4]: Ic0dd655fbd86b8ccce2b3298b4c70359a468f9ec 8130073e978ab0a826ecfab9bee1254551023a32 Bug: 305849394 Bug: 347693610 Test: presubmit Flag: EXEMPT refactor Change-Id: Ia2095de2b565a324d3cb55c9054f1352f10cd747
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions