aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 3b311377b..958092bc7 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -693,6 +693,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
return;
}
+ // Forward this event to the accessibility utilities, if enabled.
+ final AccessibilityUtils accessUtils = AccessibilityUtils.getInstance();
+ if (accessUtils.isTouchExplorationEnabled()) {
+ accessUtils.onStartInputViewInternal(attribute, restarting);
+ }
+
mSubtypeSwitcher.updateParametersOnStartInputView();
TextEntryState.reset();
@@ -1602,6 +1608,17 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mKeyboardSwitcher.onAutoCorrectionStateChanged(
words.hasWordAboveAutoCorrectionScoreThreshold());
}
+
+ // Put a blue underline to a word in TextView which will be auto-corrected.
+ final InputConnection ic = getCurrentInputConnection();
+ if (ic != null && Utils.willAutoCorrect(words)) {
+ final CharSequence textWithUnderline =
+ SuggestionSpanUtils.getTextWithAutoCorrectionIndicatorUnderline(
+ this, mComposingStringBuilder);
+ if (!TextUtils.isEmpty(textWithUnderline)) {
+ ic.setComposingText(textWithUnderline, 1);
+ }
+ }
}
public void updateSuggestions() {