Skip to content

Commit 5fa6737

Browse files
author
Jean Chalard
committed
Insert into user dict with the correct locale
This fixes a bug where a word would be entered in the user dictionary with the wrong locale. Bug: 5667272 Change-Id: I219d5461f8f8c74b6ab34f9bb157a4b977f00e68
1 parent 0a83e9d commit 5fa6737

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/java/android/widget/TextView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9925,6 +9925,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
99259925
if (suggestionInfo.suggestionIndex == ADD_TO_DICTIONARY) {
99269926
Intent intent = new Intent(Settings.ACTION_USER_DICTIONARY_INSERT);
99279927
intent.putExtra("word", originalText);
9928+
intent.putExtra("locale", getTextServicesLocale().toString());
99289929
intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
99299930
getContext().startActivity(intent);
99309931
// There is no way to know if the word was indeed added. Re-check.

0 commit comments

Comments
 (0)