aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorChieu Nguyen <cvnguyen@google.com>2015-03-11 17:09:44 -0700
committerChieu Nguyen <cvnguyen@google.com>2015-03-11 17:09:44 -0700
commit4e0af43673936c336fff298bc9aeee1d75c3bc92 (patch)
tree99b31ee46e5cd2acb1a2520253756601c6c71100 /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parent9a289da4e6ea40417422a540e821069d5d6e4a82 (diff)
downloadlatinime-4e0af43673936c336fff298bc9aeee1d75c3bc92.tar.gz
latinime-4e0af43673936c336fff298bc9aeee1d75c3bc92.tar.xz
latinime-4e0af43673936c336fff298bc9aeee1d75c3bc92.zip
Remove unused phrase gesture code.
Bug: 19687841 Change-Id: I0862aa3127bf7f1564a4845efdf99ebf5ae4d5ac
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java49
1 files changed, 3 insertions, 46 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 934da7ac7..35486ce95 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -534,29 +534,6 @@ public final class InputLogic {
final InputPointers batchPointers,
// TODO: remove these arguments
final KeyboardSwitcher keyboardSwitcher) {
- if (settingsValues.mPhraseGestureEnabled) {
- final SuggestedWordInfo candidate = mSuggestedWords.getAutoCommitCandidate();
- // If these suggested words have been generated with out of date input pointers, then
- // we skip auto-commit (see comments above on the mSequenceNumber member).
- if (null != candidate
- && mSuggestedWords.mSequenceNumber >= mAutoCommitSequenceNumber) {
- if (candidate.mSourceDict.shouldAutoCommit(candidate)) {
- final String[] commitParts = candidate.mWord.split(Constants.WORD_SEPARATOR, 2);
- batchPointers.shift(candidate.mIndexOfTouchPointOfSecondWord);
- if (SpaceState.PHANTOM == mSpaceState) {
- insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues);
- }
- mConnection.commitText(commitParts[0], 0);
- StatsUtils.onWordCommitUserTyped(commitParts[0], mWordComposer.isBatchMode());
- mSpaceState = SpaceState.PHANTOM;
- keyboardSwitcher.requestUpdatingShiftState(
- getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState());
- mWordComposer.setCapitalizedModeAtStartComposingTime(getActualCapsMode(
- settingsValues, keyboardSwitcher.getKeyboardShiftMode()));
- ++mAutoCommitSequenceNumber;
- }
- }
- }
mInputLogicHandler.onUpdateBatchInput(batchPointers, mAutoCommitSequenceNumber);
}
@@ -1984,27 +1961,8 @@ public final class InputLogic {
if (SpaceState.PHANTOM == mSpaceState) {
insertAutomaticSpaceIfOptionsAndTextAllow(settingsValues);
}
- final SuggestedWordInfo autoCommitCandidate = mSuggestedWords.getAutoCommitCandidate();
- // Commit except the last word for phrase gesture if the top suggestion is eligible for auto
- // commit.
- if (settingsValues.mPhraseGestureEnabled && null != autoCommitCandidate) {
- // Find the last space
- final int indexOfLastSpace = batchInputText.lastIndexOf(Constants.CODE_SPACE) + 1;
- if (0 != indexOfLastSpace) {
- mConnection.commitText(batchInputText.substring(0, indexOfLastSpace), 1);
- StatsUtils.onWordCommitUserTyped(
- batchInputText.substring(0, indexOfLastSpace), mWordComposer.isBatchMode());
- final SuggestedWords suggestedWordsForLastWordOfPhraseGesture =
- suggestedWords.getSuggestedWordsForLastWordOfPhraseGesture();
- mLatinIME.showSuggestionStrip(suggestedWordsForLastWordOfPhraseGesture);
- }
- final String lastWord = batchInputText.substring(indexOfLastSpace);
- mWordComposer.setBatchInputWord(lastWord);
- setComposingTextInternal(lastWord, 1);
- } else {
- mWordComposer.setBatchInputWord(batchInputText);
- setComposingTextInternal(batchInputText, 1);
- }
+ mWordComposer.setBatchInputWord(batchInputText);
+ setComposingTextInternal(batchInputText, 1);
mConnection.endBatchEdit();
// Space state must be updated before calling updateShiftState
mSpaceState = SpaceState.PHANTOM;
@@ -2186,8 +2144,7 @@ public final class InputLogic {
// hence 2; if we aren't, we should just skip whitespace if any, so 1.
mWordComposer.isComposingWord() ? 2 : 1),
keyboard,
- new SettingsValuesForSuggestion(settingsValues.mBlockPotentiallyOffensive,
- settingsValues.mPhraseGestureEnabled),
+ new SettingsValuesForSuggestion(settingsValues.mBlockPotentiallyOffensive),
settingsValues.mAutoCorrectionEnabledPerUserSettings,
inputStyle, sequenceNumber, callback);
}