Fix a condition to reset the current spell checker
TextServicesManagerService has had a logic to reset Settings.Secure.SELECTED_SPELL_CHECKER when the current spell checker service is uninstalled, but it had not been working until we fixed a bug that had prevented that logic from running [1]. However, there has been another bug in that logic itself that resets Settings.Secure.SELECTED_SPELL_CHECKER also when the current spell checker service APK is updated. With this CL, Settings.Secure.SELECTED_SPELL_CHECKER will be reset only when the package disappears, not when it is just being replaced with a new APK. [1]: I30902a3d94f2ddef33f4a8067799e98322ae3a03 34a04e40 Fix: 79110151 Test: Manually verified as follows. 1. adb install -r SampleSpellCheckerService.apk 2. adb shell settings get secure selected_spell_checker -> com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService 3. adb shell "settings put secure selected_spell_checker 'com.example.android.samplespellcheckerservice/.SampleSpellCheckerService'" 4. adb shell settings get secure selected_spell_checker -> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService 5. adb install -r SampleSpellCheckerService.apk 6. adb shell settings get secure selected_spell_checker -> com.example.android.samplespellcheckerservice/.SampleSpellCheckerService Test: Manually verified that Bug 67412078 is still fixed. Change-Id: Ic07fc2f418f051b2825d993fa959ed36f9b0f3c7
Loading
Please register or sign in to comment