am 0235016a: am 2df13452: Merge "Insert into user dict with the correct locale" into ics-mr1

* commit '0235016acb241556f24689e3d818db6973b5ad4f':
  Insert into user dict with the correct locale
This commit is contained in:
Gilles Debunne
2011-12-07 19:03:30 -08:00
committed by Android Git Automerger

View File

@@ -9931,6 +9931,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (suggestionInfo.suggestionIndex == ADD_TO_DICTIONARY) { if (suggestionInfo.suggestionIndex == ADD_TO_DICTIONARY) {
Intent intent = new Intent(Settings.ACTION_USER_DICTIONARY_INSERT); Intent intent = new Intent(Settings.ACTION_USER_DICTIONARY_INSERT);
intent.putExtra("word", originalText); intent.putExtra("word", originalText);
intent.putExtra("locale", getTextServicesLocale().toString());
intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(intent.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().startActivity(intent); getContext().startActivity(intent);
// There is no way to know if the word was indeed added. Re-check. // There is no way to know if the word was indeed added. Re-check.