diff options
| author | 2011-12-07 13:57:59 +0900 | |
|---|---|---|
| committer | 2011-12-07 13:57:59 +0900 | |
| commit | 5fa6737cac2bf246becb802982980372a4d6160b (patch) | |
| tree | 9f612e886c4b649055ab685180bd4224b39c13db | |
| parent | 0a83e9d438f35cba62a10392fb9e7e1c577aa638 (diff) | |
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
| -rw-r--r-- | core/java/android/widget/TextView.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 79949e5aaf07..109213b158b0 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -9925,6 +9925,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (suggestionInfo.suggestionIndex == ADD_TO_DICTIONARY) { Intent intent = new Intent(Settings.ACTION_USER_DICTIONARY_INSERT); intent.putExtra("word", originalText); + intent.putExtra("locale", getTextServicesLocale().toString()); intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK); getContext().startActivity(intent); // There is no way to know if the word was indeed added. Re-check. |