b1570d285aeff6338bb39155c0facba78fe6f385
The fact that isSpellCheckerEnabled returns true does not mean that getCurrentSpellChecker will return non null. By default isSpellCheckerEnabled is true in TextServicesSettings, even when there is no spellchecker service active on the device. The issue can be verified by disabling the Google Keyboard (assuming the GMS LatinImeGoogle is used) in Settings|Apps and later entering Settings|Language & input. Without this patch Settings crashes at that point with the following stack: E/AndroidRuntime(13020): Caused by: java.lang.NullPointerException: \ Attempt to invoke virtual method 'java.lang.CharSequence android.vie\ w.textservice.SpellCheckerInfo.loadLabel(android.content.pm.PackageM\ anager)' on a null object reference E/AndroidRuntime(13020): at com.android.settings.inputmethod.\ InputMethodAndLanguageSettings.onResume(InputMethodAndLanguageSettin\ gs.java:253) E/AndroidRuntime(13020): at android.app.Fragment.performResum\ e(Fragment.java:2096) E/AndroidRuntime(13020): at android.app.FragmentManagerImpl.m\ oveToState(FragmentManager.java:928) E/AndroidRuntime(13020): at android.app.FragmentManagerImpl.m\ oveToState(FragmentManager.java:1067) Bug: 19832033 Change-Id: I65e6d269572e064aa6897807b6611ef947d90211
Description
No description provided
Languages
Java
89.8%
Kotlin
10.2%