aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-07-01 02:17:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-01 02:17:52 +0000
commitfdc63036bee068170545198c67ac5ce1273a69d0 (patch)
treece25dbb9f78823af388ce51ee360783e04c7708e /java/src
parent4115a59646d236cdef379c2b566edfbd0b2cd7be (diff)
parent256243dd03869dcd1b6844dcc83406aa9adba08e (diff)
downloadlatinime-fdc63036bee068170545198c67ac5ce1273a69d0.tar.gz
latinime-fdc63036bee068170545198c67ac5ce1273a69d0.tar.xz
latinime-fdc63036bee068170545198c67ac5ce1273a69d0.zip
am 256243dd: Merge "[SD5] Remove useless args"
* commit '256243dd03869dcd1b6844dcc83406aa9adba08e': [SD5] Remove useless args
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java18
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java3
2 files changed, 3 insertions, 18 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 62b55bca1..96bf17b5c 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -620,27 +620,13 @@ public final class RichInputConnection {
}
/**
- * @param sortedSeparators a sorted array of code points which may separate words
- * @return the word that surrounds the cursor, including up to one trailing
- * separator. For example, if the field contains "he|llo world", where |
- * represents the cursor, then "hello " will be returned.
- */
- public CharSequence getWordAtCursor(final int[] sortedSeparators) {
- // getWordRangeAtCursor returns null if the connection is null
- final TextRange r = getWordRangeAtCursor(sortedSeparators, 0);
- return (r == null) ? null : r.mWord;
- }
-
- /**
* Returns the text surrounding the cursor.
*
* @param sortedSeparators a sorted array of code points that split words.
- * @param additionalPrecedingWordsCount the number of words before the current word that should
- * be included in the returned range
* @return a range containing the text surrounding the cursor
*/
- public TextRange getWordRangeAtCursor(final int[] sortedSeparators,
- final int additionalPrecedingWordsCount) {
+ public TextRange getWordRangeAtCursor(final int[] sortedSeparators) {
+ final int additionalPrecedingWordsCount = 0;
mIC = mParent.getCurrentInputConnection();
if (mIC == null) {
return null;
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 8831d36f7..b9a87c921 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -1288,8 +1288,7 @@ public final class InputLogic {
return;
}
final TextRange range = mConnection.getWordRangeAtCursor(
- settingsValues.mSpacingAndPunctuations.mSortedWordSeparators,
- 0 /* additionalPrecedingWordsCount */);
+ settingsValues.mSpacingAndPunctuations.mSortedWordSeparators);
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 for some strange reason (editor bug or so) we measure the text before the cursor as