summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/TextServicesManagerService.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com/android/server/TextServicesManagerService.java')
-rw-r--r--services/java/com/android/server/TextServicesManagerService.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/java/com/android/server/TextServicesManagerService.java b/services/java/com/android/server/TextServicesManagerService.java
index c7b336f411b0..c74dd0038c5f 100644
--- a/services/java/com/android/server/TextServicesManagerService.java
+++ b/services/java/com/android/server/TextServicesManagerService.java
@@ -198,7 +198,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
}
// TODO: Respect allowImplicitlySelectedSubtype
- // TODO: Save SpellCheckerSubtype by supported languages.
+ // TODO: Save SpellCheckerSubtype by supported languages by looking at "locale".
@Override
public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
String locale, boolean allowImplicitlySelectedSubtype) {
@@ -250,10 +250,10 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
for (int i = 0; i < sci.getSubtypeCount(); ++i) {
final SpellCheckerSubtype scs = sci.getSubtypeAt(i);
if (hashCode == 0) {
- if (candidateLocale.equals(locale)) {
+ final String scsLocale = scs.getLocale();
+ if (candidateLocale.equals(scsLocale)) {
return scs;
} else if (candidate == null) {
- final String scsLocale = scs.getLocale();
if (candidateLocale.length() >= 2 && scsLocale.length() >= 2
&& candidateLocale.startsWith(scsLocale)) {
// Fall back to the applicable language