am 591580ee: Merge "[IL61] Remove an internal use of key coordinates"

* commit '591580ee8a084d06343b95e409931d05c7269e3c':
  [IL61] Remove an internal use of key coordinates
main
Jean Chalard 2014-01-21 21:21:47 -08:00 committed by Android Git Automerger
commit 073faa18ee
1 changed files with 9 additions and 9 deletions

View File

@ -449,8 +449,12 @@ public final class InputLogic {
final boolean didAutoCorrect; final boolean didAutoCorrect;
if (settingsValues.isWordSeparator(codePoint) if (settingsValues.isWordSeparator(codePoint)
|| Character.getType(codePoint) == Character.OTHER_SYMBOL) { || Character.getType(codePoint) == Character.OTHER_SYMBOL) {
didAutoCorrect = handleSeparator(settingsValues, codePoint, x, y, spaceState, didAutoCorrect = handleSeparator(settingsValues, codePoint,
keyboardSwitcher, handler); Constants.SUGGESTION_STRIP_COORDINATE == x, spaceState, keyboardSwitcher,
handler);
if (settingsValues.mIsInternal) {
LatinImeLoggerUtils.onSeparator((char)codePoint, x, y);
}
} else { } else {
didAutoCorrect = false; didAutoCorrect = false;
if (SpaceState.PHANTOM == spaceState) { if (SpaceState.PHANTOM == spaceState) {
@ -585,13 +589,12 @@ public final class InputLogic {
* Handle input of a separator code point. * Handle input of a separator code point.
* @param settingsValues The current settings values. * @param settingsValues The current settings values.
* @param codePoint the code point associated with the key. * @param codePoint the code point associated with the key.
* @param x the x-coordinate of the key press, or Contants.NOT_A_COORDINATE if not applicable. * @param isFromSuggestionStrip whether this code point comes from the suggestion strip.
* @param y the y-coordinate of the key press, or Contants.NOT_A_COORDINATE if not applicable.
* @param spaceState the space state at start of the batch input. * @param spaceState the space state at start of the batch input.
* @return whether this caused an auto-correction to happen. * @return whether this caused an auto-correction to happen.
*/ */
private boolean handleSeparator(final SettingsValues settingsValues, private boolean handleSeparator(final SettingsValues settingsValues,
final int codePoint, final int x, final int y, final int spaceState, final int codePoint, final boolean isFromSuggestionStrip, final int spaceState,
// TODO: remove these arguments // TODO: remove these arguments
final KeyboardSwitcher keyboardSwitcher, final LatinIME.UIHandler handler) { final KeyboardSwitcher keyboardSwitcher, final LatinIME.UIHandler handler) {
boolean didAutoCorrect = false; boolean didAutoCorrect = false;
@ -618,7 +621,7 @@ public final class InputLogic {
} }
final boolean swapWeakSpace = maybeStripSpace(settingsValues, codePoint, spaceState, final boolean swapWeakSpace = maybeStripSpace(settingsValues, codePoint, spaceState,
Constants.SUGGESTION_STRIP_COORDINATE == x); isFromSuggestionStrip);
if (SpaceState.PHANTOM == spaceState && if (SpaceState.PHANTOM == spaceState &&
settingsValues.isUsuallyPrecededBySpace(codePoint)) { settingsValues.isUsuallyPrecededBySpace(codePoint)) {
@ -667,9 +670,6 @@ public final class InputLogic {
// already displayed or not, so it's okay. // already displayed or not, so it's okay.
mLatinIME.setPunctuationSuggestions(); mLatinIME.setPunctuationSuggestions();
} }
if (settingsValues.mIsInternal) {
LatinImeLoggerUtils.onSeparator((char)codePoint, x, y);
}
keyboardSwitcher.updateShiftState(); keyboardSwitcher.updateShiftState();
return didAutoCorrect; return didAutoCorrect;