Query right user's enabled IMEs in KeyguardPasswordView
This CL fixes a regression introduced by my previous CL [1], which enabled InputMethodManager#getEnabledInputMethodList() to return the result based on the caller's user ID, not based on the current IME user, even when it gets called from background users. Since Keyguard always runs as user 0 currently, it is now Keyguard's responsibility for querying enabled IMEs with an explicit user ID. To do so this CL adds a @hide API IMM#getEnabledInputMethodListAsUser() and lets KeyguardPasswordView use it. [1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b 7f8ee4b9 Bug: 122164939 Fix: 123904896 Test: Manually verified as follows. 1. Build aosp_taimen-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 at the right end of the password field. Change-Id: I6e7d7353c2b5b1da5d460ae005fb2585f85fb1c4
Loading
Please register or sign in to comment