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

Commit 7018a90c authored by satok's avatar satok
Browse files

Fix the issue on matching the locale in TextServicesManagerService

Bug: 6542210

Change-Id: I42d84b684d5689e8fceecb705bb51d19d847477a
parent f927e17a
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;
                        }