Skip to content

Commit 594cb47

Browse files
satok16Android (Google) Code Review
authored andcommitted
Merge "Use user's settings for the spell check language instead of the system locale"
2 parents af43add + 70deff4 commit 594cb47

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

core/java/android/widget/SpellChecker.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public SpellChecker(TextView textView) {
6161
final TextServicesManager textServicesManager = (TextServicesManager) textView.getContext().
6262
getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
6363
mSpellCheckerSession = textServicesManager.newSpellCheckerSession(
64-
null /* not currently used by the textServicesManager */, Locale.getDefault(),
64+
null /* not currently used by the textServicesManager */,
65+
null /* null locale means use the languages defined in Settings
66+
if referToSpellCheckerLanguageSettings is true */,
6567
this, true /* means use the languages defined in Settings */);
6668
mCookie = hashCode();
6769

services/java/com/android/server/TextServicesManagerService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ public SpellCheckerSubtype getCurrentSpellCheckerSubtype(
238238
}
239239
} else if (scs.hashCode() == hashCode) {
240240
if (DBG) {
241-
Slog.w(TAG, "Return subtype " + scs.hashCode());
241+
Slog.w(TAG, "Return subtype " + scs.hashCode() + ", input= " + locale
242+
+ ", " + scs.getLocale());
242243
}
243244
return scs;
244245
}

0 commit comments

Comments
 (0)