am 64506cd0: Merge "Remove a write-only variable."

* commit '64506cd038b4a19b4c8994cbbc1a07aecdb00434':
  Remove a write-only variable.
main
Jean Chalard 2011-12-16 04:03:10 -08:00 committed by Android Git Automerger
commit 54625064f2
1 changed files with 1 additions and 10 deletions

View File

@ -198,7 +198,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private boolean mIsUserDictionaryAvailable; private boolean mIsUserDictionaryAvailable;
private WordComposer mWordComposer = new WordComposer(); private WordComposer mWordComposer = new WordComposer();
private boolean mHasUncommittedTypedChars;
private int mCorrectionMode; private int mCorrectionMode;
private String mWordSavedForAutoCorrectCancellation; private String mWordSavedForAutoCorrectCancellation;
@ -759,7 +758,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
inputView.closing(); inputView.closing();
mEnteredText = null; mEnteredText = null;
mWordComposer.reset(); mWordComposer.reset();
mHasUncommittedTypedChars = false;
mDeleteCount = 0; mDeleteCount = 0;
mSpaceState = SPACE_STATE_NONE; mSpaceState = SPACE_STATE_NONE;
@ -867,7 +865,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|| mVoiceProxy.isVoiceInputHighlighted()) || mVoiceProxy.isVoiceInputHighlighted())
&& (selectionChanged || candidatesCleared)) { && (selectionChanged || candidatesCleared)) {
mWordComposer.reset(); mWordComposer.reset();
mHasUncommittedTypedChars = false;
updateSuggestions(); updateSuggestions();
final InputConnection ic = getCurrentInputConnection(); final InputConnection ic = getCurrentInputConnection();
if (ic != null) { if (ic != null) {
@ -1077,7 +1074,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
public void commitTyped(final InputConnection ic) { public void commitTyped(final InputConnection ic) {
if (!mWordComposer.isComposingWord()) return; if (!mWordComposer.isComposingWord()) return;
mHasUncommittedTypedChars = false;
final CharSequence typedWord = mWordComposer.getTypedWord(); final CharSequence typedWord = mWordComposer.getTypedWord();
mWordComposer.onCommitWord(); mWordComposer.onCommitWord();
if (typedWord.length() > 0) { if (typedWord.length() > 0) {
@ -1360,7 +1356,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// If we have deleted the last remaining character of a word, then we are not // If we have deleted the last remaining character of a word, then we are not
// isComposingWord() any more. // isComposingWord() any more.
if (!mWordComposer.isComposingWord()) { if (!mWordComposer.isComposingWord()) {
mHasUncommittedTypedChars = false;
// Not composing word any more, so we can show bigrams. // Not composing word any more, so we can show bigrams.
mHandler.postUpdateBigramPredictions(); mHandler.postUpdateBigramPredictions();
} else { } else {
@ -1490,7 +1485,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} }
} }
if (isComposingWord) { if (isComposingWord) {
mHasUncommittedTypedChars = true;
mWordComposer.add(code, keyCodes, x, y); mWordComposer.add(code, keyCodes, x, y);
if (ic != null) { if (ic != null) {
// If it's the first letter, make note of auto-caps state // If it's the first letter, make note of auto-caps state
@ -1961,7 +1955,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
ic.commitText(bestWord, 1); ic.commitText(bestWord, 1);
} }
} }
mHasUncommittedTypedChars = false;
mWordComposer.onCommitWord(); mWordComposer.onCommitWord();
} }
@ -2105,7 +2098,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private void restartSuggestionsOnWordBeforeCursor(final InputConnection ic, private void restartSuggestionsOnWordBeforeCursor(final InputConnection ic,
final CharSequence word) { final CharSequence word) {
mWordComposer.setComposingWord(word, mKeyboardSwitcher.getLatinKeyboard()); mWordComposer.setComposingWord(word, mKeyboardSwitcher.getLatinKeyboard());
mHasUncommittedTypedChars = true;
mComposingStateManager.onStartComposingText(); mComposingStateManager.onStartComposingText();
ic.deleteSurroundingText(word.length(), 0); ic.deleteSurroundingText(word.length(), 0);
ic.setComposingText(word, 1); ic.setComposingText(word, 1);
@ -2164,7 +2156,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// Note: in the interest of code simplicity, we may want to just call // Note: in the interest of code simplicity, we may want to just call
// restartSuggestionsOnWordBeforeCursorIfAtEndOfWord instead, but retrieving // restartSuggestionsOnWordBeforeCursorIfAtEndOfWord instead, but retrieving
// the old WordComposer allows to reuse the actual typed coordinates. // the old WordComposer allows to reuse the actual typed coordinates.
mHasUncommittedTypedChars = true;
mWordComposer.resumeSuggestionOnKeptWord(); mWordComposer.resumeSuggestionOnKeptWord();
ic.setComposingText(mWordComposer.getTypedWord(), 1); ic.setComposingText(mWordComposer.getTypedWord(), 1);
mHandler.cancelUpdateBigramPredictions(); mHandler.cancelUpdateBigramPredictions();
@ -2452,7 +2443,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
p.println(" Keyboard mode = " + keyboardMode); p.println(" Keyboard mode = " + keyboardMode);
p.println(" mIsSuggestionsRequested=" + mInputAttributes.mIsSettingsSuggestionStripOn); p.println(" mIsSuggestionsRequested=" + mInputAttributes.mIsSettingsSuggestionStripOn);
p.println(" mCorrectionMode=" + mCorrectionMode); p.println(" mCorrectionMode=" + mCorrectionMode);
p.println(" mHasUncommittedTypedChars=" + mHasUncommittedTypedChars); p.println(" isComposingWord=" + mWordComposer.isComposingWord());
p.println(" mAutoCorrectEnabled=" + mSettingsValues.mAutoCorrectEnabled); p.println(" mAutoCorrectEnabled=" + mSettingsValues.mAutoCorrectEnabled);
p.println(" mInsertSpaceOnPickSuggestionManually=" p.println(" mInsertSpaceOnPickSuggestionManually="
+ mInputAttributes.mInsertSpaceOnPickSuggestionManually); + mInputAttributes.mInsertSpaceOnPickSuggestionManually);