Add SHOW_IME_WITH_HARD_KEYBOARD to CLONE_TO_MANAGED_PROFILE
With this CL, SHOW_IME_WITH_HARD_KEYBOARD will be shared within the same profile group. Since AccessibilityManagerService always reads SHOW_IME_WITH_HARD_KEYBOARD from the profile parent user [1], in practice sharing SHOW_IME_WITH_HARD_KEYBOARD within the same profile group would be the easiest and safest way for now to avoid breaking SHOW_IME_WITH_HARD_KEYBOARD. Note that with my previous CL [2], InputMethodSettings already adjust the target user ID by checking CLONE_TO_MANAGED_PROFILE when writing secure settings. Hence no change in the InputMethodManagerService side is necessary. When work profile is not enabled, there should be no behavior change. [1]: I530481e102ac376a4506b662862ee1ee74815b40 03a65b04 [2]: Ieefefb8630ddef3b247ebb865a604e5c72dfb49c 15be5e6f Fix: 123379418 Test: manually verified as follows. 1. Build aosp_taimen-userdebug and flash it. 2. adb root 3. adb shell setprop persist.debug.per_profile_ime 1 4. Install Test DPC. 5. Enable managed profile with Test DPC. 6. Attach a Bluetooth hardware keyboard. 7. make -j EditTextVariations 8. adb install -r \ $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk 9. adb shell am start --user 10 -n \ com.android.inputmethod.tools.edittextvariations/.EditTextVariations 10. Focus in the top edit field on the EditTextVariations. 11. Tap the IME switcher icon on the navigation bar. 12. adb shell settings get secure --user 0 show_ime_with_hard_keyboard -> 0 13. adb shell settings get secure --user 10 show_ime_with_hard_keyboard -> 0 14. Toggle "Show virtual keyboard" button to enable it. 15. adb shell settings get secure --user 0 show_ime_with_hard_keyboard -> 1 16. adb shell settings get secure --user 10 show_ime_with_hard_keyboard -> 1 Change-Id: Iacb79b24d6bd97495ac81a58c1df651cf594a8c2
Loading
Please register or sign in to comment