Merge "Reset mWordIteratorWithText when SpellChecker locale is changed." into nyc-dev
am: 01ef02d785

* commit '01ef02d7853fd2996eae3d139f02d190f3c174a2':
  Reset mWordIteratorWithText when SpellChecker locale is changed.
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 6959137..3f5ad66 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -926,7 +926,8 @@
     }
 
     void onLocaleChanged() {
-        // Will be re-created on demand in getWordIterator with the proper new locale
+        // Will be re-created on demand in getWordIterator and getWordIteratorWithText with the
+        // proper new locale
         mWordIterator = null;
         mWordIteratorWithText = null;
     }
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 4c461ad..0ce4a12 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8923,8 +8923,7 @@
     }
 
     void onLocaleChanged() {
-        // Will be re-created on demand in getWordIterator with the proper new locale
-        mEditor.mWordIterator = null;
+        mEditor.onLocaleChanged();
     }
 
     /**