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

Commit c0fbe54f authored by satok's avatar satok Committed by Android Git Automerger
Browse files

am 13236440: am 7018a90c: Fix the issue on matching the locale in TextServicesManagerService

* commit '13236440':
  Fix the issue on matching the locale in TextServicesManagerService
parents 5284148f 13236440
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -254,10 +254,8 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
                        return scs;
                    } else if (candidate == null) {
                        final String scsLocale = scs.getLocale();
                        if (candidateLocale.length() >= 2
                                && scsLocale.length() >= 2
                                && candidateLocale.substring(0, 2).equals(
                                        scsLocale.substring(0, 2))) {
                        if (candidateLocale.length() >= 2 && scsLocale.length() >= 2
                                && candidateLocale.startsWith(scsLocale)) {
                            // Fall back to the applicable language
                            candidate = scs;
                        }