• Guliz Tuncay's avatar
    Select only preinstalled Spell Checker Services · becc0144
    Guliz Tuncay authored
    When we are setting a new spell checker as the default one in
    Secure.Settings, TSMS#findAvailSpellCheckerLocked can pick up
    any available spell checker service. This violates the principle
    that user should be warned whenever we are setting an untrusted
    spell checker service as the default service, since the warning
    dialog is never shown.
    
    Fixes: 64764051
    Bug: 118694079
    Test: Manually as follows:
    1. Open 'packages/inputmethods/LatinIME/java/AndroidManifest.xml'
         and remove 'AndroidSpellCheckerService'
    2. lunch aosp_buillhead-userdebug && make -j
    3. Flash the image
    4. adb shell dumpsys textservices
        -> no spell checker is recognized
    5. adb shell settings get secure selected_spell_checker
        -> null
    6. tapas SampleSpellCheckerService
    7. make -j
    8. adb install -r $OUT/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
    9. adb shell dumpsys textservices
        -> SampleSpellCheckerService is recognized
    10. adb shell settings get secure selected_spell_checker
        -> null
    
    Change-Id: I16f12293d15258c9148677c7ee09fe6dcf81e81d
    Merged-In: Idab3ecc246fe9344a09e6907a0ba39f8ea6506f9
    (cherry picked from commit ed5973b8)
    becc0144
Name
Last commit
Last update
api Loading commit data...
cmds Loading commit data...
core Loading commit data...
data Loading commit data...
docs Loading commit data...
drm Loading commit data...
graphics Loading commit data...
include Loading commit data...
keystore Loading commit data...
libs Loading commit data...
location Loading commit data...
media Loading commit data...
native Loading commit data...
nfc-extras Loading commit data...
obex Loading commit data...
opengl/java Loading commit data...
packages Loading commit data...
proto Loading commit data...
rs Loading commit data...
samples/training/network-usage Loading commit data...
sax Loading commit data...
services Loading commit data...
telecomm/java Loading commit data...
telephony/java Loading commit data...
test-runner Loading commit data...
tests Loading commit data...
tools Loading commit data...
wifi/java/android/net/wifi Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
MODULE_LICENSE_APACHE2 Loading commit data...
NOTICE Loading commit data...
compiled-classes-phone Loading commit data...
preloaded-classes Loading commit data...