Log user IDs for both IME and IME-client in StartInputHistory
This is a follow up CL to my recent CL [1], which added an @hide API EditorInfo#targetInputMethodUser for privileged components such as System UI to be able to override the expected IME user, based on their INTERACT_ACROSS_USERS_FULL permission. This is critical for per-profile IME mode and direct-reply to coexist. To make it easier to diagnose this new scenario, this CL updates our retrospective debugging mechanism called StartInputHistory [2]. With this CL, InputMethodManagerService starts keeping track of both IME user ID and IME client user ID for each StartInput so that we can see them later into the StartInputHistory section of the bugreport. For Direct-Reply scenario for instance, we would see a log like this: ... imeUserId=10 ... targetUserId=0 ... There should be no user-visible behavior change. [1]: Ia7ea944438d69669ccdf9111b34ba400e786a602 0f5eade4 [2]: Icb29c4ef0703553ead8654d3255a554de6d1a9b4 357b2f60 Bug: 35079353 Bug: 120744418 Test: Manually verified as follows. 1. Build aosp_taimen-userdebug and flash it. 2. adb shell pm create-user test_user 3. adb shell am switch-user 10 4. make -j EditTextVariations 5. adb install -r \ $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk 6. adb shell am start \ -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations 7. Tap the menu icon on the EditTextVariations then click "Direct Reply" 8. Open notification shade. 9. Tap reply icon on "Message from UserHandle{10}". 10. Make sure that AOSP Keyboard is shown. 11. adb shell dumpsys input_method 12. Make sure that you can see both "imeUserId=10" and "targetUserId=0" in the last StartInputHistory. Change-Id: Ica21e2f4cb41c7a5f4195f08f05220e2f65c1bf1
Loading
Please register or sign in to comment