From d4b533774df4db403ecf2a7126f2637c451aefee Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Thu, 28 Jul 2011 15:24:46 -0700 Subject: [PATCH] Remove unused method Bug: 4521802 Change-Id: Iae649f8b77b3bb144ee7eedbb6545e237fa79a17 --- .../inputmethod/keyboard/PointerTracker.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index 6b6a4538f..b25754de4 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -329,36 +329,28 @@ public class PointerTracker { return mKeyDetector.getKeyIndexAndNearbyCodes(x, y, null); } - public boolean isSpaceKey(int keyIndex) { - Key key = getKey(keyIndex); - return key != null && key.mCode == Keyboard.CODE_SPACE; - } - private void setReleasedKeyGraphics(int keyIndex) { mDrawingProxy.dismissKeyPreview(this); final Key key = getKey(keyIndex); - if (key != null) { + if (key != null && key.isEnabled()) { key.onReleased(); mDrawingProxy.invalidateKey(key); } } private void setPressedKeyGraphics(int keyIndex) { - if (isKeyPreviewRequired(keyIndex)) { - mDrawingProxy.showKeyPreview(keyIndex, this); - } final Key key = getKey(keyIndex); if (key != null && key.isEnabled()) { + if (isKeyPreviewRequired(key)) { + mDrawingProxy.showKeyPreview(keyIndex, this); + } key.onPressed(); mDrawingProxy.invalidateKey(key); } } // The modifier key, such as shift key, should not show its key preview. - private boolean isKeyPreviewRequired(int keyIndex) { - final Key key = getKey(keyIndex); - if (key == null || !key.isEnabled()) - return false; + private static boolean isKeyPreviewRequired(Key key) { final int code = key.mCode; if (isModifierCode(code) || code == Keyboard.CODE_DELETE || code == Keyboard.CODE_ENTER || code == Keyboard.CODE_SPACE)