aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-10 11:36:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-10 11:36:01 +0000
commitdb0adf86a4c615ca8838238a1c318b1fbc05111e (patch)
tree1e21f2ad3244f385f3f4035ec38ae13acf4a44fe /java/src
parenteb66f1906d4269dd5c10ab83c86e3885f140cc4f (diff)
parent6c24b91601e1f38810782f5f5e927e5d2202fc93 (diff)
downloadlatinime-db0adf86a4c615ca8838238a1c318b1fbc05111e.tar.gz
latinime-db0adf86a4c615ca8838238a1c318b1fbc05111e.tar.xz
latinime-db0adf86a4c615ca8838238a1c318b1fbc05111e.zip
Merge "[IL55] Remove a useless argument."
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java2
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java17
2 files changed, 3 insertions, 16 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index c9602bcc4..40391694c 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -202,7 +202,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
break;
case MSG_RESUME_SUGGESTIONS:
latinIme.mInputLogic.restartSuggestionsOnWordTouchedByCursor(
- latinIme.mSettings.getCurrent(), 0 /* offset */,
+ latinIme.mSettings.getCurrent(),
false /* includeResumedWordInSuggestions */, latinIme.mKeyboardSwitcher);
break;
case MSG_REOPEN_DICTIONARIES:
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 7222b73b3..55e92cc09 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -816,7 +816,6 @@ public final class InputLogic {
&& settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces
&& !mConnection.isCursorFollowedByWordCharacter(settingsValues)) {
restartSuggestionsOnWordTouchedByCursor(settingsValues,
- deleteCountAtStart - mDeleteCount /* offset */,
true /* includeResumedWordInSuggestions */, keyboardSwitcher);
}
// We just removed at least one character. We need to update the auto-caps state.
@@ -1043,13 +1042,12 @@ public final class InputLogic {
* do nothing.
*
* @param settingsValues the current values of the settings.
- * @param offset how much the cursor is expected to have moved since the last updateSelection.
* @param includeResumedWordInSuggestions whether to include the word on which we resume
* suggestions in the suggestion list.
*/
// TODO: make this private.
public void restartSuggestionsOnWordTouchedByCursor(final SettingsValues settingsValues,
- final int offset, final boolean includeResumedWordInSuggestions,
+ final boolean includeResumedWordInSuggestions,
// TODO: Remove this argument.
final KeyboardSwitcher keyboardSwitcher) {
// HACK: We may want to special-case some apps that exhibit bad behavior in case of
@@ -1109,19 +1107,8 @@ public final class InputLogic {
keyboardSwitcher.getKeyboard());
mWordComposer.setCursorPositionWithinWord(
typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
- // TODO: Change these lines to setComposingRegion(cursorPosition,
- // cursorPosition + range.getNumberOfCharsInWordAfterCursor());
- if (0 != offset) {
- // Backspace was pressed. We are at the end of a word, and we don't know the cursor
- // position for sure, so use relative methods.
- mConnection.deleteSurroundingText(numberOfCharsInWordBeforeCursor, 0);
- mConnection.setComposingText(typedWord, 1);
- } else {
- // This is recorrection. The cursor position is reasonably reliable, and the cursor
- // may be in the middle of a word so use setComposingRegion.
- mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor,
+ mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor,
expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor());
- }
if (suggestions.isEmpty()) {
// We come here if there weren't any suggestion spans on this word. We will try to
// compute suggestions for it instead.