We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f927e17 commit 7018a90Copy full SHA for 7018a90
services/java/com/android/server/TextServicesManagerService.java
@@ -254,10 +254,8 @@ public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
254
return scs;
255
} else if (candidate == null) {
256
final String scsLocale = scs.getLocale();
257
- if (candidateLocale.length() >= 2
258
- && scsLocale.length() >= 2
259
- && candidateLocale.substring(0, 2).equals(
260
- scsLocale.substring(0, 2))) {
+ if (candidateLocale.length() >= 2 && scsLocale.length() >= 2
+ && candidateLocale.startsWith(scsLocale)) {
261
// Fall back to the applicable language
262
candidate = scs;
263
}
0 commit comments