summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TextView.java
diff options
context:
space:
mode:
authorKohsuke Yatoh <kyatoh@google.com>2020-12-03 00:10:19 +0000
committerKohsuke Yatoh <kyatoh@google.com>2020-12-15 22:48:47 +0000
commite751e1036a0467e3aa2c8ecd23266b65eccea4d7 (patch)
treeb9e7231f7202f97ae08bfe8632fa40131da99433 /core/java/android/widget/TextView.java
parent0f04a2e670d1d27176bcd3e18e29cebea2dbf868 (diff)
Add InputConnection#performSpellCheck().
IME can use this method to redo spell checking after it has learned a new user dictionary word. Bug: 166304720 Test: atest CtsInputMethodTestCases:SpellCheckerTest Change-Id: I956cd46f25bb77b7e1a6a3e1478c0d7efa1a056a
Diffstat (limited to 'core/java/android/widget/TextView.java')
-rw-r--r--core/java/android/widget/TextView.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 02a930017906..ffe1b382cfda 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8913,6 +8913,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// intentionally empty
}
+ /** @hide */
+ public void onPerformSpellCheck() {
+ if (mEditor != null && mEditor.mSpellChecker != null) {
+ mEditor.mSpellChecker.onPerformSpellCheck();
+ }
+ }
+
/**
* Called by the framework in response to a private command from the
* current method, provided by it calling