From 292deb632cbab232334190e68d29184094d6d51b Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 27 Jun 2014 22:44:24 +0900 Subject: [SD7] Actually check for script. ...also implement the check for Hebrew and Arabic. Bug: 15840116 Change-Id: Ia6433d7d98038ade64c171be4fe4b3f094111fac --- .../src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java') diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index b9a87c921..7719c6db6 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -1288,9 +1288,14 @@ public final class InputLogic { return; } final TextRange range = mConnection.getWordRangeAtCursor( - settingsValues.mSpacingAndPunctuations.mSortedWordSeparators); + settingsValues.mSpacingAndPunctuations.mSortedWordSeparators, + currentKeyboardScriptId); if (null == range) return; // Happens if we don't have an input connection at all - if (range.length() <= 0) return; // Race condition. No text to resume on, so bail out. + if (range.length() <= 0) { + // Race condition, or touching a word in a non-supported script. + mLatinIME.setNeutralSuggestionStrip(); + return; + } // If for some strange reason (editor bug or so) we measure the text before the cursor as // longer than what the entire text is supposed to be, the safe thing to do is bail out. if (range.mHasUrlSpans) return; // If there are links, we don't resume suggestions. Making -- cgit v1.2.3-83-g751a