diff options
| author | satok <satok@google.com> | 2012-03-05 23:25:29 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-05 23:25:29 -0800 |
| commit | 231ef8fa3e6cf0961c62b2bf54300722ea3c9b64 (patch) | |
| tree | 0e7674264b898af28dc559cdb79a72093b6e5779 /java/src/com/android/inputmethod/keyboard/PointerTracker.java | |
| parent | d1dbdb6b20d05d4bae4272756c10776f075f6b55 (diff) | |
| parent | ca7ec2097ca6af1505c1e6aa8b81b6068ba46dae (diff) | |
Merge "Integrate the logic to calculate the proximities"
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/PointerTracker.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/PointerTracker.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index f8f17bdd9..7a9915be0 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -105,7 +105,6 @@ public class PointerTracker { } } - private static KeyboardSwitcher sKeyboardSwitcher; // Parameters for pointer handling. private static LatinKeyboardView.PointerTrackerParams sParams; private static int sTouchNoiseThresholdDistanceSquared; @@ -172,7 +171,6 @@ public class PointerTracker { } setParameters(LatinKeyboardView.PointerTrackerParams.DEFAULT); - sKeyboardSwitcher = KeyboardSwitcher.getInstance(); } public static void setParameters(LatinKeyboardView.PointerTrackerParams params) { @@ -254,13 +252,13 @@ public class PointerTracker { // Note that we need primaryCode argument because the keyboard may in shifted state and the // primaryCode is different from {@link Key#mCode}. - private void callListenerOnCodeInput(Key key, int primaryCode, int[] keyCodes, int x, int y) { + private void callListenerOnCodeInput(Key key, int primaryCode, int x, int y) { final boolean ignoreModifierKey = mIgnoreModifierKey && key.isModifier(); final boolean alterCode = key.altCodeWhileTyping() && mTimerProxy.isTyping(); final int code = alterCode ? key.mAltCode : primaryCode; if (DEBUG_LISTENER) { Log.d(TAG, "onCodeInput: " + Keyboard.printableCode(code) + " text=" + key.mOutputText - + " codes="+ KeyDetector.printableCodes(keyCodes) + " x=" + x + " y=" + y + + " x=" + x + " y=" + y + " ignoreModifier=" + ignoreModifierKey + " alterCode=" + alterCode + " enabled=" + key.isEnabled()); } @@ -271,7 +269,7 @@ public class PointerTracker { if (code == Keyboard.CODE_OUTPUT_TEXT) { mListener.onTextInput(key.mOutputText); } else if (code != Keyboard.CODE_UNSPECIFIED) { - mListener.onCodeInput(code, keyCodes, x, y); + mListener.onCodeInput(code, x, y); } if (!key.altCodeWhileTyping() && !key.isModifier()) { mTimerProxy.startKeyTypedTimer(); @@ -719,10 +717,7 @@ public class PointerTracker { } int code = key.mCode; - final int[] codes = mKeyDetector.newCodeArray(); - mKeyDetector.getKeyAndNearbyCodes(x, y, codes); - - callListenerOnCodeInput(key, code, codes, x, y); + callListenerOnCodeInput(key, code, x, y); callListenerOnRelease(key, code, false); } |
