diff options
| author | 2018-08-30 13:41:32 -0700 | |
|---|---|---|
| committer | 2018-08-30 13:41:32 -0700 | |
| commit | c8c5f1345ed3aecb04cb7aecec10845de2ddf85f (patch) | |
| tree | 7047994d761e51bcbf82c147c054a8036ceb7fd7 /libs/hwui/ProgramCache.h | |
| parent | c96760f4f30279bdddcbdc83398bc069740970f1 (diff) | |
IMMS should preserve selected IME upon boot
This is another follow up CL to my refactoring CL [1], which
unintentionally changed the condition to reset default
enabled/selected IMEs when the device boots up.
My previous attempt [2] actually fixed the unexpected reset of
the enabled IMEs (Bug 67093433), but did not fix the unexpected reset
of the selected IME (Bug 113159114).
The culprit was IMMS#resetDefaultImeLocked(), which always resets the
selected IME when it gets called in a too early boot phase where
mCurMethodId is still null.  Actually it turns out that we do not need
to call IMMS#resetDefaultImeLocked() from IMMS#systemRunning() at all,
because
    buildInputMethodListLocked(!imeSelectedOnBoot /* resetDefaultEnabledIme */)
one line above already takes care of such a case.
Note that this issue is observable only on direct-boot aware devices
because of the same reason explained in my previous CL [2].
 [1]: I5b37c450db4b25b3e635b6d634293a34eec8b9d4
      7924782c000733b2d7a180701b74988f0154adee
 [2]: Id624d577d941245cca944498dc6935eb364865cf
      1f9a3cbe39a91bd5579e42a0c7a9ae251d955e8e
Fix: 113159114
Test: Manually verified as follows
  1. Check out AOSP master
  2. Build an OS image for a direct-boot aware device then flash it.
  3. Open
       development/samples/SoftKeyboard/AndroidManifest.xml
     then add
       android:directBootAware="true"
     to the IME service.
  4. tapas SoftKeyboard
  5. make -j
  6. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  7. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  8. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
  9. adb shell locksettings set-password aaaa
 10. adb reboot
 11. Make sure that
      * Sample Soft keyboard is shown by default on the unlock screen.
      * AOSP Keyboard is also enabled.
Change-Id: Icb782c01c742a9359b5a6684c360f30c5cf9cdc9
Diffstat (limited to 'libs/hwui/ProgramCache.h')
0 files changed, 0 insertions, 0 deletions