OSDN Git Service

DO NOT MERGE: Disable SpellChecker in secondary user's direct reply
authorTarandeep Singh <tarandeep@google.com>
Mon, 1 Jul 2019 21:27:25 +0000 (14:27 -0700)
committerBryan Ferris <bferris@google.com>
Thu, 18 Jul 2019 23:47:09 +0000 (16:47 -0700)
commitb52efcb9d58348d2bcb9c83d36b0f1ae1244482b
treeda7741e20b823f3bdc0a1a00f10fe84bf48b241b
parent42441907888c31450ea46afdb34d0094deddd8fb
DO NOT MERGE: Disable SpellChecker in secondary user's direct reply

For secondary users, when AOSP keyboard is used to type in
direct-reply, unknown words can be added to dictionary.
It's *not* OK for SpellCheckerService of primary user to
check unknown words typed by a secondary user.
The dialog to add these words shows up in primary user instead.

TextView uses TextView#isSuggestionsEnabled() to determine if
SpellChecker is enabled. This can be disabled by setting the flag
TYPE_TEXT_FLAG_NO_SUGGESTIONS in inputType.

Note: This doesn't affect workprofile users on P or older versions since
they use same SpellCheckerService for all workprofiles.

Bug: 123232892
Test: Manually tested using the steps mentioned in the bug.
 1. Flash latest P build.
 2. Install AOSP keyboard (LatinIME) and set it as default.
 3. Install and open EditTextVariations
 4. Initiate direct reply in primary user and type non-english
    words like "ggggg hhhhh".
 5. Observe that they get red underline and tapping it brings "add
    to dictionary" popup.
 6. Create a new secondary user and switch to it.
 7. Once the setup completes, initiate a direct reply and type words
    similar to step 4.
 8. Verify that red underlines dont appear.
 9. switch back to primary user and verify direct reply still has red
    underlines.

Change-Id: I93918eb2c12e37908e03a7951a9e2c5375bc0ecc
packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java