aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-27 15:31:23 +0900
committerJean Chalard <jchalard@google.com>2014-01-17 02:10:56 +0900
commitab4543d5938a6f96f6f8027d1f7b85f8d2f465e2 (patch)
treee291d73dcffbecb42970f571736fb38b18adea13 /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parent81255612bcd231e843fc390023b0bd51117b8829 (diff)
downloadlatinime-ab4543d5938a6f96f6f8027d1f7b85f8d2f465e2.tar.gz
latinime-ab4543d5938a6f96f6f8027d1f7b85f8d2f465e2.tar.xz
latinime-ab4543d5938a6f96f6f8027d1f7b85f8d2f465e2.zip
[IL61] Remove an internal use of key coordinates
Bug: 8636060 Change-Id: Id87b0ac4a99ec6a26db6e250d6cd22defc02a23d
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index fcad0470a..0c33e6b72 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -449,8 +449,12 @@ public final class InputLogic {
final boolean didAutoCorrect;
if (settingsValues.isWordSeparator(codePoint)
|| Character.getType(codePoint) == Character.OTHER_SYMBOL) {
- didAutoCorrect = handleSeparator(settingsValues, codePoint, x, y, spaceState,
- keyboardSwitcher, handler);
+ didAutoCorrect = handleSeparator(settingsValues, codePoint,
+ Constants.SUGGESTION_STRIP_COORDINATE == x, spaceState, keyboardSwitcher,
+ handler);
+ if (settingsValues.mIsInternal) {
+ LatinImeLoggerUtils.onSeparator((char)codePoint, x, y);
+ }
} else {
didAutoCorrect = false;
if (SpaceState.PHANTOM == spaceState) {
@@ -585,13 +589,12 @@ public final class InputLogic {
* Handle input of a separator code point.
* @param settingsValues The current settings values.
* @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 y the y-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 spaceState the space state at start of the batch input.
* @return whether this caused an auto-correction to happen.
*/
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
final KeyboardSwitcher keyboardSwitcher, final LatinIME.UIHandler handler) {
boolean didAutoCorrect = false;
@@ -618,7 +621,7 @@ public final class InputLogic {
}
final boolean swapWeakSpace = maybeStripSpace(settingsValues, codePoint, spaceState,
- Constants.SUGGESTION_STRIP_COORDINATE == x);
+ isFromSuggestionStrip);
if (SpaceState.PHANTOM == spaceState &&
settingsValues.isUsuallyPrecededBySpace(codePoint)) {
@@ -667,9 +670,6 @@ public final class InputLogic {
// already displayed or not, so it's okay.
mLatinIME.setPunctuationSuggestions();
}
- if (settingsValues.mIsInternal) {
- LatinImeLoggerUtils.onSeparator((char)codePoint, x, y);
- }
keyboardSwitcher.updateShiftState();
return didAutoCorrect;