From ac78633be28e8990fc3b3a8de192c80966e746e3 Mon Sep 17 00:00:00 2001
From: "Tadashi G. Takaoka" <takaoka@google.com>
Date: Tue, 21 Aug 2012 14:05:57 +0900
Subject: [PATCH] Rename and consolidate some constants

Change-Id: I7863936cca18b28bf0117afcbcf544a5fd7f185d
---
 .../inputmethod/keyboard/KeyDetector.java     |  6 ++---
 .../keyboard/KeyboardActionListener.java      | 24 ++++++++-----------
 .../keyboard/MainKeyboardView.java            |  5 ++--
 .../keyboard/MoreKeysKeyboardView.java        |  4 +++-
 .../inputmethod/keyboard/ProximityInfo.java   |  5 ++--
 .../inputmethod/latin/BinaryDictionary.java   |  2 +-
 .../android/inputmethod/latin/Constants.java  |  7 ++++++
 .../latin/ExpandableDictionary.java           |  7 +++---
 .../android/inputmethod/latin/LatinIME.java   | 19 +++++++--------
 .../inputmethod/latin/WordComposer.java       |  9 ++-----
 .../AndroidWordLevelSpellCheckerSession.java  |  5 ++--
 .../spellcheck/SpellCheckerProximityInfo.java |  4 ++--
 .../inputmethod/research/ResearchLogger.java  | 12 ++++------
 .../inputmethod/latin/InputTestsBase.java     |  5 +---
 14 files changed, 53 insertions(+), 61 deletions(-)

diff --git a/java/src/com/android/inputmethod/keyboard/KeyDetector.java b/java/src/com/android/inputmethod/keyboard/KeyDetector.java
index c0e6aa8d77..868c8cab56 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyDetector.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyDetector.java
@@ -16,10 +16,10 @@
 
 package com.android.inputmethod.keyboard;
 
+import com.android.inputmethod.latin.Constants;
 
-public class KeyDetector {
-    public static final int NOT_A_CODE = -1;
 
+public class KeyDetector {
     private final int mKeyHysteresisDistanceSquared;
 
     private Keyboard mKeyboard;
@@ -103,7 +103,7 @@ public class KeyDetector {
         final StringBuilder sb = new StringBuilder();
         boolean addDelimiter = false;
         for (final int code : codes) {
-            if (code == NOT_A_CODE) break;
+            if (code == Constants.NOT_A_CODE) break;
             if (addDelimiter) sb.append(", ");
             sb.append(Keyboard.printableCode(code));
             addDelimiter = true;
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
index b1621a55b8..5c8f78f5e4 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardActionListener.java
@@ -16,6 +16,7 @@
 
 package com.android.inputmethod.keyboard;
 
+import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.InputPointers;
 
 public interface KeyboardActionListener {
@@ -44,21 +45,16 @@ public interface KeyboardActionListener {
      *
      * @param primaryCode this is the code of the key that was pressed
      * @param x x-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
-     *            {@link PointerTracker} or so, the value should be {@link #NOT_A_TOUCH_COORDINATE}.
-     *            If it's called on insertion from the suggestion strip, it should be
-     *            {@link #SUGGESTION_STRIP_COORDINATE}.
+     *            {@link PointerTracker} or so, the value should be
+     *            {@link Constants#NOT_A_COORDINATE}. If it's called on insertion from the
+     *            suggestion strip, it should be {@link Constants#SUGGESTION_STRIP_COORDINATE}.
      * @param y y-coordinate pixel of touched event. If {@link #onCodeInput} is not called by
-     *            {@link PointerTracker} or so, the value should be {@link #NOT_A_TOUCH_COORDINATE}.
-     *            If it's called on insertion from the suggestion strip, it should be
-     *            {@link #SUGGESTION_STRIP_COORDINATE}.
+     *            {@link PointerTracker} or so, the value should be
+     *            {@link Constants#NOT_A_COORDINATE}.If it's called on insertion from the
+     *            suggestion strip, it should be {@link Constants#SUGGESTION_STRIP_COORDINATE}.
      */
     public void onCodeInput(int primaryCode, int x, int y);
 
-    // See {@link Adapter#isInvalidCoordinate(int)}.
-    public static final int NOT_A_TOUCH_COORDINATE = -1;
-    public static final int SUGGESTION_STRIP_COORDINATE = -2;
-    public static final int SPELL_CHECKER_COORDINATE = -3;
-
     /**
      * Sends a sequence of characters to the listener.
      *
@@ -119,9 +115,9 @@ public interface KeyboardActionListener {
 
         // TODO: Remove this method when the vertical correction is removed.
         public static boolean isInvalidCoordinate(int coordinate) {
-            // Detect {@link KeyboardActionListener#NOT_A_TOUCH_COORDINATE},
-            // {@link KeyboardActionListener#SUGGESTION_STRIP_COORDINATE}, and
-            // {@link KeyboardActionListener#SPELL_CHECKER_COORDINATE}.
+            // Detect {@link Constants#NOT_A_COORDINATE},
+            // {@link Constants#SUGGESTION_STRIP_COORDINATE}, and
+            // {@link Constants#SPELL_CHECKER_COORDINATE}.
             return coordinate < 0;
         }
     }
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 9590290ea3..f572cb80d4 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -608,9 +608,8 @@ public class MainKeyboardView extends KeyboardView implements PointerTracker.Key
     }
 
     private void invokeCodeInput(int primaryCode) {
-        mKeyboardActionListener.onCodeInput(primaryCode,
-                KeyboardActionListener.NOT_A_TOUCH_COORDINATE,
-                KeyboardActionListener.NOT_A_TOUCH_COORDINATE);
+        mKeyboardActionListener.onCodeInput(
+                primaryCode, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
     }
 
     private void invokeReleaseKey(int primaryCode) {
diff --git a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
index 870eff29fe..e513a14777 100644
--- a/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MoreKeysKeyboardView.java
@@ -25,6 +25,7 @@ import android.widget.PopupWindow;
 
 import com.android.inputmethod.keyboard.PointerTracker.DrawingProxy;
 import com.android.inputmethod.keyboard.PointerTracker.TimerProxy;
+import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.InputPointers;
 import com.android.inputmethod.latin.R;
 
@@ -50,7 +51,8 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
         public void onCodeInput(int primaryCode, int x, int y) {
             // Because a more keys keyboard doesn't need proximity characters correction, we don't
             // send touch event coordinates.
-            mListener.onCodeInput(primaryCode, NOT_A_TOUCH_COORDINATE, NOT_A_TOUCH_COORDINATE);
+            mListener.onCodeInput(
+                    primaryCode, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
         }
 
         @Override
diff --git a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
index ac0a56ba38..71bf31faaa 100644
--- a/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
+++ b/java/src/com/android/inputmethod/keyboard/ProximityInfo.java
@@ -20,6 +20,7 @@ import android.graphics.Rect;
 import android.text.TextUtils;
 
 import com.android.inputmethod.keyboard.Keyboard.Params.TouchPositionCorrection;
+import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.JniUtils;
 
 import java.util.Arrays;
@@ -111,7 +112,7 @@ public class ProximityInfo {
         final Key[] keys = mKeys;
         final TouchPositionCorrection touchPositionCorrection = mTouchPositionCorrection;
         final int[] proximityCharsArray = new int[mGridSize * MAX_PROXIMITY_CHARS_SIZE];
-        Arrays.fill(proximityCharsArray, KeyDetector.NOT_A_CODE);
+        Arrays.fill(proximityCharsArray, Constants.NOT_A_CODE);
         for (int i = 0; i < mGridSize; ++i) {
             final int proximityCharsLength = gridNeighborKeys[i].length;
             for (int j = 0; j < proximityCharsLength; ++j) {
@@ -234,7 +235,7 @@ public class ProximityInfo {
             dest[index++] = code;
         }
         if (index < destLength) {
-            dest[index] = KeyDetector.NOT_A_CODE;
+            dest[index] = Constants.NOT_A_CODE;
         }
     }
 
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 2d9e0ce2ce..f6635847b5 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -136,7 +136,7 @@ public class BinaryDictionary extends Dictionary {
             final CharSequence prevWord, final ProximityInfo proximityInfo, int sessionId) {
         if (!isValidDictionary()) return null;
 
-        Arrays.fill(mInputCodePoints, WordComposer.NOT_A_CODE);
+        Arrays.fill(mInputCodePoints, Constants.NOT_A_CODE);
         // TODO: toLowerCase in the native code
         final int[] prevWordCodePointArray = (null == prevWord)
                 ? null : StringUtils.toCodePointArray(prevWord.toString());
diff --git a/java/src/com/android/inputmethod/latin/Constants.java b/java/src/com/android/inputmethod/latin/Constants.java
index 1242967ad4..d71c0f995a 100644
--- a/java/src/com/android/inputmethod/latin/Constants.java
+++ b/java/src/com/android/inputmethod/latin/Constants.java
@@ -128,6 +128,13 @@ public final class Constants {
         }
     }
 
+    public static final int NOT_A_CODE = -1;
+
+    // See {@link KeyboardActionListener.Adapter#isInvalidCoordinate(int)}.
+    public static final int NOT_A_COORDINATE = -1;
+    public static final int SUGGESTION_STRIP_COORDINATE = -2;
+    public static final int SPELL_CHECKER_COORDINATE = -3;
+
     private Constants() {
         // This utility class is not publicly instantiable.
     }
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
index d101aaf15e..11dca3404d 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
@@ -19,7 +19,6 @@ package com.android.inputmethod.latin;
 import android.content.Context;
 import android.text.TextUtils;
 
-import com.android.inputmethod.keyboard.KeyDetector;
 import com.android.inputmethod.keyboard.Keyboard;
 import com.android.inputmethod.keyboard.ProximityInfo;
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
@@ -292,9 +291,9 @@ public class ExpandableDictionary extends Dictionary {
                 mCodes[i] = new int[ProximityInfo.MAX_PROXIMITY_CHARS_SIZE];
             }
             final int x = xCoordinates != null && i < xCoordinates.length ?
-                    xCoordinates[i] : WordComposer.NOT_A_COORDINATE;
+                    xCoordinates[i] : Constants.NOT_A_COORDINATE;
             final int y = xCoordinates != null && i < yCoordinates.length ?
-                    yCoordinates[i] : WordComposer.NOT_A_COORDINATE;
+                    yCoordinates[i] : Constants.NOT_A_COORDINATE;
             proximityInfo.fillArrayWithNearestKeyCodes(x, y, codes.getCodeAt(i), mCodes[i]);
         }
         mMaxDepth = mInputLength * 3;
@@ -487,7 +486,7 @@ public class ExpandableDictionary extends Dictionary {
                 for (int j = 0; j < alternativesSize; j++) {
                     final int addedAttenuation = (j > 0 ? 1 : 2);
                     final int currentChar = currentChars[j];
-                    if (currentChar == KeyDetector.NOT_A_CODE) {
+                    if (currentChar == Constants.NOT_A_CODE) {
                         break;
                     }
                     if (currentChar == lowerC || currentChar == c) {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 58df15929e..d1a542a180 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1326,8 +1326,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                     keyX = x;
                     keyY = y;
                 } else {
-                    keyX = NOT_A_TOUCH_COORDINATE;
-                    keyY = NOT_A_TOUCH_COORDINATE;
+                    keyX = Constants.NOT_A_COORDINATE;
+                    keyY = Constants.NOT_A_COORDINATE;
                 }
                 handleCharacter(primaryCode, keyX, keyY, spaceState);
             }
@@ -1619,7 +1619,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
             mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1);
         } else {
             final boolean swapWeakSpace = maybeStripSpace(primaryCode,
-                    spaceState, KeyboardActionListener.SUGGESTION_STRIP_COORDINATE == x);
+                    spaceState, Constants.SUGGESTION_STRIP_COORDINATE == x);
 
             sendKeyCodePoint(primaryCode);
 
@@ -1649,7 +1649,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
         }
 
         final boolean swapWeakSpace = maybeStripSpace(primaryCode, spaceState,
-                KeyboardActionListener.SUGGESTION_STRIP_COORDINATE == x);
+                Constants.SUGGESTION_STRIP_COORDINATE == x);
 
         if (SPACE_STATE_PHANTOM == spaceState &&
                 mCurrentSettings.isPhantomSpacePromotingSymbol(primaryCode)) {
@@ -1896,8 +1896,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
             }
             final int primaryCode = suggestion.charAt(0);
             onCodeInput(primaryCode,
-                    KeyboardActionListener.SUGGESTION_STRIP_COORDINATE,
-                    KeyboardActionListener.SUGGESTION_STRIP_COORDINATE);
+                    Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE);
             return;
         }
 
@@ -1957,8 +1956,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                 // If the suggestion is not in the dictionary, the hint should be shown.
                 && !AutoCorrection.isValidWord(mSuggest.getUnigramDictionaries(), suggestion, true);
 
-        Utils.Stats.onSeparator((char)Keyboard.CODE_SPACE, WordComposer.NOT_A_COORDINATE,
-                WordComposer.NOT_A_COORDINATE);
+        Utils.Stats.onSeparator((char)Keyboard.CODE_SPACE,
+                Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
         if (showingAddToDictionaryHint && mIsUserDictionaryAvailable) {
             mSuggestionStripView.showAddToDictionaryHint(
                     suggestion, mCurrentSettings.mHintToSaveText);
@@ -2086,8 +2085,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
         mConnection.commitText(originallyTypedWord, 1);
         // Re-insert the separator
         sendKeyCodePoint(mLastComposedWord.mSeparatorCode);
-        Utils.Stats.onSeparator(mLastComposedWord.mSeparatorCode, WordComposer.NOT_A_COORDINATE,
-                WordComposer.NOT_A_COORDINATE);
+        Utils.Stats.onSeparator(mLastComposedWord.mSeparatorCode,
+                Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
         if (ProductionFlag.IS_EXPERIMENTAL) {
             ResearchLogger.latinIME_revertCommit(originallyTypedWord);
         }
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 5606a58e4f..40ee7d23a5 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -17,7 +17,6 @@
 package com.android.inputmethod.latin;
 
 import com.android.inputmethod.keyboard.Key;
-import com.android.inputmethod.keyboard.KeyDetector;
 import com.android.inputmethod.keyboard.Keyboard;
 
 import java.util.Arrays;
@@ -26,10 +25,6 @@ import java.util.Arrays;
  * A place to store the currently composing word with information such as adjacent key codes as well
  */
 public class WordComposer {
-
-    public static final int NOT_A_CODE = KeyDetector.NOT_A_CODE;
-    public static final int NOT_A_COORDINATE = -1;
-
     private static final int N = BinaryDictionary.MAX_WORD_LENGTH;
 
     private int[] mPrimaryKeyCodes;
@@ -166,7 +161,7 @@ public class WordComposer {
             final int codePoint = Character.codePointAt(word, i);
             // We don't want to override the batch input points that are held in mInputPointers
             // (See {@link #add(int,int,int)}).
-            add(codePoint, NOT_A_COORDINATE, NOT_A_COORDINATE);
+            add(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
         }
     }
 
@@ -181,7 +176,7 @@ public class WordComposer {
             add(codePoint, x, y);
             return;
         }
-        add(codePoint, NOT_A_COORDINATE, NOT_A_COORDINATE);
+        add(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
     }
 
     /**
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java
index 317fe7cd34..f4784ff1a9 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidWordLevelSpellCheckerSession.java
@@ -24,6 +24,7 @@ import android.view.textservice.SuggestionsInfo;
 import android.view.textservice.TextInfo;
 
 import com.android.inputmethod.compat.SuggestionsInfoCompatUtils;
+import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.LocaleUtils;
 import com.android.inputmethod.latin.WordComposer;
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
@@ -225,8 +226,8 @@ public abstract class AndroidWordLevelSpellCheckerSession extends Session {
                 final int xy = SpellCheckerProximityInfo.getXYForCodePointAndScript(
                         codePoint, mScript);
                 if (SpellCheckerProximityInfo.NOT_A_COORDINATE_PAIR == xy) {
-                    composer.add(codePoint, WordComposer.NOT_A_COORDINATE,
-                            WordComposer.NOT_A_COORDINATE);
+                    composer.add(codePoint,
+                            Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
                 } else {
                     composer.add(codePoint, xy & 0xFFFF, xy >> 16);
                 }
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java b/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
index bd92d883ba..1762e29aa4 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/SpellCheckerProximityInfo.java
@@ -16,14 +16,14 @@
 
 package com.android.inputmethod.latin.spellcheck;
 
-import com.android.inputmethod.keyboard.KeyDetector;
 import com.android.inputmethod.keyboard.ProximityInfo;
+import com.android.inputmethod.latin.Constants;
 
 import java.util.TreeMap;
 
 public class SpellCheckerProximityInfo {
     /* public for test */
-    final public static int NUL = KeyDetector.NOT_A_CODE;
+    final public static int NUL = Constants.NOT_A_CODE;
 
     // This must be the same as MAX_PROXIMITY_CHARS_SIZE else it will not work inside
     // native code - this value is passed at creation of the binary object and reused
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index 384a2b1a4f..845ba9c4c3 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -50,11 +50,11 @@ import android.widget.Toast;
 
 import com.android.inputmethod.keyboard.Key;
 import com.android.inputmethod.keyboard.Keyboard;
-import com.android.inputmethod.keyboard.KeyboardActionListener;
 import com.android.inputmethod.keyboard.KeyboardId;
 import com.android.inputmethod.keyboard.KeyboardSwitcher;
 import com.android.inputmethod.keyboard.KeyboardView;
 import com.android.inputmethod.keyboard.MainKeyboardView;
+import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.Dictionary;
 import com.android.inputmethod.latin.LatinIME;
 import com.android.inputmethod.latin.R;
@@ -1065,9 +1065,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
     public static void latinIME_pickApplicationSpecifiedCompletion(final int index,
             final CharSequence cs) {
         final Object[] values = {
-            index, cs,
-            KeyboardActionListener.SUGGESTION_STRIP_COORDINATE,
-            KeyboardActionListener.SUGGESTION_STRIP_COORDINATE
+            index, cs, Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE
         };
         final ResearchLogger researchLogger = getInstance();
         researchLogger.enqueuePotentiallyPrivateEvent(
@@ -1082,8 +1080,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
         final Object[] values = {
             scrubDigitsFromString(replacedWord), index,
             (suggestion == null ? null : scrubDigitsFromString(suggestion.toString())),
-            KeyboardActionListener.SUGGESTION_STRIP_COORDINATE,
-            KeyboardActionListener.SUGGESTION_STRIP_COORDINATE
+            Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE
         };
         final ResearchLogger researchLogger = getInstance();
         researchLogger.enqueuePotentiallyPrivateEvent(EVENTKEYS_LATINIME_PICKSUGGESTIONMANUALLY,
@@ -1097,8 +1094,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
             final CharSequence suggestion) {
         final Object[] values = {
             index, suggestion,
-            KeyboardActionListener.SUGGESTION_STRIP_COORDINATE,
-            KeyboardActionListener.SUGGESTION_STRIP_COORDINATE
+            Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE
         };
         getInstance().enqueueEvent(EVENTKEYS_LATINIME_PUNCTUATIONSUGGESTION, values);
     }
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index abf2f75b0a..9feec2be98 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -39,7 +39,6 @@ import android.widget.TextView;
 
 import com.android.inputmethod.keyboard.Key;
 import com.android.inputmethod.keyboard.Keyboard;
-import com.android.inputmethod.keyboard.KeyboardActionListener;
 
 import java.util.HashMap;
 
@@ -222,9 +221,7 @@ public class InputTestsBase extends ServiceTestCase<LatinIME> {
                 return;
             }
         }
-        mLatinIME.onCodeInput(codePoint,
-                KeyboardActionListener.NOT_A_TOUCH_COORDINATE,
-                KeyboardActionListener.NOT_A_TOUCH_COORDINATE);
+        mLatinIME.onCodeInput(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
         //mLatinIME.onReleaseKey(codePoint, false);
     }
 
-- 
GitLab