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

* commit '7018a90c323a7f0deb37939d5505ff112ac637f5':
  Fix the issue on matching the locale in TextServicesManagerService
This commit is contained in:
satok
2012-05-24 03:35:55 -07:00
committed by Android Git Automerger

View File

@@ -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;
}