Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9c0d4785 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Remove unnecessary workaround for IME switcher

This is a logical revert of an old workaround CL [1], which should no
longer is necessary now.

When the original CL [1] was written, Keyguard was always calling the
following two APIs, which were always returning the current user's IME
list at that time.

 * InputMethodManager#getEnabledInputMethodList()
 * InputMethodManager#getEnabledInputMethodSubtypeList()

This is why a 500ms delay was needed in before Keyguard's calling
these APIs at that time.

Since then, during the work of per-profile IME project, we have
already upgraded Keyguard to use

 * InputMethodManager#getEnabledInputMethodListAsUser()
 * InputMethodManager#getEnabledInputMethodSubtypeListAsUser()

instead with an explicit user ID [2], which in theory can never have
this kind of race condition.

There must be no user observable behavior change.

 [1]: I93ea71d73540c31fbbe1cc4bd6747871f957dcc6
      982a94c5
 [2]: I6e7d7353c2b5b1da5d460ae005fb2585f85fb1c4
      1fb13c59

Bug: 30640917
Test: atest SystemUiRoboTests
Test: Manually verified that Bug 30640917 remains to be fixed.
  1. Build aosp_bluejay-trunk_staging-userdebug and flash it
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  5. adb shell locksettings set-password aaaa
  6. adb shell pm create-user test_user
  7. adb shell am switch-user 10
  8. adb shell am switch-user 0
  9. Make sure that the IME switcher icon is shown
Test: Manually verified that Bug 123904896 remains to be fixed.
  1. Build aosp_bluejay-trunk_staging-userdebug and flash it
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  5. adb shell pm create-user test_user
  6. adb shell am switch-user 10
  7. adb shell locksettings set-password aaaa
  8. adb shell wm dismiss-keyguard
  9. Make sure that the IME switcher icon is not shown
Change-Id: I37c8fe76e2a7daf322a86f5eb6c6986d988d4f93
parent bb756a05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment