Honor text-operation user in "Add to dictionary"
This is a follow up CL to my previous CL [1], which introduced a
concept of "text-operation user" into TextView then plumbed it to IME
APIs and spell checker APIs as a short term workaround for System UI's
hosting multiple users' text contents in user 0 process.
With this CL, "Add to dictionary" menu item for misspelled words also
takes this text-operation user into account.
[1]: I6d11e4d6a84570bc2991a8552349e8b216b0d139
401e3d4c842ce86569de4477138137dc07a6aa6f
Fix: 123955642
Test: Manually done 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. Type "gggg".
11. Make sure a red underline is shown.
12. Tap "gggg".
13. Make sure a dropdown UI is shown below "gggg".
14. Tap "ADD TO DICTIONARY"
15. Dismiss the notification shade.
16. Make sure "Add to dictionary" dialog is shown.
Change-Id: Iaf11cd7e54636ab552e2469006e120e39dca99a8
2 files changed