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

Commit f927e17a authored by satok's avatar satok
Browse files

Use correct spell check locale

Bug: 6542210
Change-Id: I414aa2321f30e396996d90fb8e90c1dbb3bb7b9e
parent 67e6070f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -146,7 +146,10 @@ public final class SpellCheckerSubtype implements Parcelable {
        return false;
    }

    private static Locale constructLocaleFromString(String localeStr) {
    /**
     * @hide
     */
    public static Locale constructLocaleFromString(String localeStr) {
        if (TextUtils.isEmpty(localeStr))
            return null;
        String[] localeParams = localeStr.split("_", 3);
+1 −1
Original line number Diff line number Diff line
@@ -7678,7 +7678,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                mContext.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
        final SpellCheckerSubtype subtype = textServicesManager.getCurrentSpellCheckerSubtype(true);
        if (subtype != null) {
            locale = new Locale(subtype.getLocale());
            locale = SpellCheckerSubtype.constructLocaleFromString(subtype.getLocale());
        }
        return locale;
    }