Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70deff4c authored by satok's avatar satok
Browse files

Use user's settings for the spell check language instead of the system locale

Bug: 5390462
Change-Id: Ia2a3981cb93f451646debe5ee6b037313825cf9f
parent 5c06f0f0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -61,7 +61,9 @@ public class SpellChecker implements SpellCheckerSessionListener {
        final TextServicesManager textServicesManager = (TextServicesManager) textView.getContext().
                getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
        mSpellCheckerSession = textServicesManager.newSpellCheckerSession(
                null /* not currently used by the textServicesManager */, Locale.getDefault(),
                null /* not currently used by the textServicesManager */,
                null /* null locale means use the languages defined in Settings
                        if referToSpellCheckerLanguageSettings is true */,
                this, true /* means use the languages defined in Settings */);
        mCookie = hashCode();

+2 −1
Original line number Diff line number Diff line
@@ -238,7 +238,8 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
                    }
                } else if (scs.hashCode() == hashCode) {
                    if (DBG) {
                        Slog.w(TAG, "Return subtype " + scs.hashCode());
                        Slog.w(TAG, "Return subtype " + scs.hashCode() + ", input= " + locale
                                + ", " + scs.getLocale());
                    }
                    return scs;
                }