Skip to content
Commit 1c94b8cc authored by Guliz Tuncay's avatar Guliz Tuncay
Browse files

Clean up TSMS#setCurrentSpellCheckerLocked.

Remove the unnecessary calls to getCurrentSpellChecker and containsKey
in TSMS#setCurrentSpellCheckerLocked. We do not change visible
user/developer behavior in this CL.

Fixes: 63540846
Test: Manually as follows:
  Test 1:
   1. Make sure you have two users such as this:
     User Owner (userId 0), User A (userId 11)
   2. Clear A's SC settings on the command line by
     adb shell "settings --user 11 put secure selected_spell_checker ''"
   4. Check SC value in settings, should be null
   5. Switch to Owner
   6. Switch back to A (so that TSMS#resetInternalState is called)
   7. Make sure SC value in settings is not empty by
     adb shell settings --user 11 get secure selected_spell_checker
  Test 2:
   1. 2 versions of SampleSpellCheckerService:
     one with a single SCS (v1), one with 2 SCSs (v2)
   2. Install v2 by
   adb install -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
   3. adb shell settings put secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService2
   4. Install v1
   5. adb shell settings get secure selected_spell_checker
    Should return
    com.example.android.samplespellcheckerservice/.SampleSpellCheckerService2
    This is buggy behavior, see bug#63542224. We aim to keep the
    user/developer behavior as is.
Change-Id: Idaa5b738d0d8c01c12a8d9cd7ac2a6b27c7ae4ad
parent 43bc8a0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment