Reset mWordIteratorWithText when SpellChecker locale is changed.
Bug: 27537808
Change-Id: Ic55b543456cc859673b4c17cc5bf6e4b6da21e13
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 167aca7..5ba94e6 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -921,7 +921,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 ac3eaf7..b6e98ef 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8916,8 +8916,7 @@
}
void onLocaleChanged() {
- // Will be re-created on demand in getWordIterator with the proper new locale
- mEditor.mWordIterator = null;
+ mEditor.onLocaleChanged();
}
/**