Loading services/core/java/com/android/server/TextServicesManagerService.java +55 −51 Original line number Diff line number Diff line Loading @@ -459,13 +459,18 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { if (!calledFromValidUser()) { return null; } final int subtypeHashCode; final SpellCheckerInfo sci; final Locale systemLocale; synchronized (mSpellCheckerMap) { final int subtypeHashCode = subtypeHashCode = mSettings.getSelectedSpellCheckerSubtype(SpellCheckerSubtype.SUBTYPE_ID_NONE); if (DBG) { Slog.w(TAG, "getCurrentSpellCheckerSubtype: " + subtypeHashCode); } final SpellCheckerInfo sci = getCurrentSpellChecker(null); sci = getCurrentSpellChecker(null); systemLocale = mContext.getResources().getConfiguration().locale; } if (sci == null || sci.getSubtypeCount() == 0) { if (DBG) { Slog.w(TAG, "Subtype not found."); Loading Loading @@ -493,7 +498,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { } if (candidateLocale == null) { // 2. Use System locale if available in the spell checker candidateLocale = mContext.getResources().getConfiguration().locale.toString(); candidateLocale = systemLocale.toString(); } } SpellCheckerSubtype candidate = null; Loading Loading @@ -524,7 +529,6 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { // spell check languages return candidate; } } @Override public void getSpellCheckerService(String sciId, String locale, Loading Loading
services/core/java/com/android/server/TextServicesManagerService.java +55 −51 Original line number Diff line number Diff line Loading @@ -459,13 +459,18 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { if (!calledFromValidUser()) { return null; } final int subtypeHashCode; final SpellCheckerInfo sci; final Locale systemLocale; synchronized (mSpellCheckerMap) { final int subtypeHashCode = subtypeHashCode = mSettings.getSelectedSpellCheckerSubtype(SpellCheckerSubtype.SUBTYPE_ID_NONE); if (DBG) { Slog.w(TAG, "getCurrentSpellCheckerSubtype: " + subtypeHashCode); } final SpellCheckerInfo sci = getCurrentSpellChecker(null); sci = getCurrentSpellChecker(null); systemLocale = mContext.getResources().getConfiguration().locale; } if (sci == null || sci.getSubtypeCount() == 0) { if (DBG) { Slog.w(TAG, "Subtype not found."); Loading Loading @@ -493,7 +498,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { } if (candidateLocale == null) { // 2. Use System locale if available in the spell checker candidateLocale = mContext.getResources().getConfiguration().locale.toString(); candidateLocale = systemLocale.toString(); } } SpellCheckerSubtype candidate = null; Loading Loading @@ -524,7 +529,6 @@ public class TextServicesManagerService extends ITextServicesManager.Stub { // spell check languages return candidate; } } @Override public void getSpellCheckerService(String sciId, String locale, Loading