aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/TextRange.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-09-20 18:21:10 +0900
committerJean Chalard <jchalard@google.com>2013-09-20 18:21:10 +0900
commitbe3be424a38ecb46bb24423be42ad290e896c6cc (patch)
treebf7858af1c4ee1dc01ca5a6c91a628a7fed47ef6 /java/src/com/android/inputmethod/latin/utils/TextRange.java
parent3de1aca289d9fa1173b61cac0a93537d72f41c4b (diff)
downloadlatinime-be3be424a38ecb46bb24423be42ad290e896c6cc.tar.gz
latinime-be3be424a38ecb46bb24423be42ad290e896c6cc.tar.xz
latinime-be3be424a38ecb46bb24423be42ad290e896c6cc.zip
Fix a bug that happens upon a race condition
Bug: 10848621 Change-Id: If5ff7f001e69af005a5ff9ab3e9f630b88a0a858
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/TextRange.java')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/TextRange.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/TextRange.java b/java/src/com/android/inputmethod/latin/utils/TextRange.java
index 5793e4170..48b443ddd 100644
--- a/java/src/com/android/inputmethod/latin/utils/TextRange.java
+++ b/java/src/com/android/inputmethod/latin/utils/TextRange.java
@@ -40,6 +40,10 @@ public final class TextRange {
return mWordAtCursorEndIndex - mCursorIndex;
}
+ public int length() {
+ return mWord.length();
+ }
+
/**
* Gets the suggestion spans that are put squarely on the word, with the exact start
* and end of the span matching the boundaries of the word.