diff options
author | 2011-10-28 11:13:15 -0700 | |
---|---|---|
committer | 2011-10-28 11:13:15 -0700 | |
commit | f2c57551a70de651dc34bd2d73f5e622ba3887db (patch) | |
tree | 92726c288f9c6f5f09ef8877596ce3132c3e05be /java/src | |
parent | 07a445572f7fa21c0e24f5cdb0f0b88ff2adc672 (diff) | |
parent | 166530b1950543b0f918055411b9a0c5960a769b (diff) | |
download | latinime-f2c57551a70de651dc34bd2d73f5e622ba3887db.tar.gz latinime-f2c57551a70de651dc34bd2d73f5e622ba3887db.tar.xz latinime-f2c57551a70de651dc34bd2d73f5e622ba3887db.zip |
Merge "Removed lift-to-type from LatinIME accessibility." into ics-mr1
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java | 30 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java | 10 |
2 files changed, 0 insertions, 40 deletions
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java index 4c109c708..cef82267f 100644 --- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java +++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java @@ -23,7 +23,6 @@ import android.graphics.Paint; import android.inputmethodservice.InputMethodService; import android.util.Log; import android.view.MotionEvent; -import android.view.ViewConfiguration; import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.EditorInfo; @@ -38,18 +37,12 @@ public class AccessibleKeyboardViewProxy { private static final String TAG = AccessibleKeyboardViewProxy.class.getSimpleName(); private static final AccessibleKeyboardViewProxy sInstance = new AccessibleKeyboardViewProxy(); - // Delay in milliseconds between key press DOWN and UP events - private static final long DELAY_KEY_PRESS = 10; - private InputMethodService mInputMethod; private FlickGestureDetector mGestureDetector; private LatinKeyboardView mView; private AccessibleKeyboardActionListener mListener; - private int mScaledEdgeSlop; private int mLastHoverKeyIndex = KeyDetector.NOT_A_KEY; - private int mLastX = -1; - private int mLastY = -1; public static void init(InputMethodService inputMethod, SharedPreferences prefs) { sInstance.initInternal(inputMethod, prefs); @@ -77,7 +70,6 @@ public class AccessibleKeyboardViewProxy { mInputMethod = inputMethod; mGestureDetector = new KeyboardFlickGestureDetector(inputMethod); - mScaledEdgeSlop = ViewConfiguration.get(inputMethod).getScaledEdgeSlop(); } public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event, @@ -143,27 +135,10 @@ public class AccessibleKeyboardViewProxy { if (keyIndex != mLastHoverKeyIndex) { fireKeyHoverEvent(tracker, mLastHoverKeyIndex, false); mLastHoverKeyIndex = keyIndex; - mLastX = x; - mLastY = y; fireKeyHoverEvent(tracker, mLastHoverKeyIndex, true); } return true; - case MotionEventCompatUtils.ACTION_HOVER_EXIT: - final int width = mView.getWidth(); - final int height = mView.getHeight(); - - if (x < mScaledEdgeSlop || y < mScaledEdgeSlop || x >= (width - mScaledEdgeSlop) - || y >= (height - mScaledEdgeSlop)) { - fireKeyHoverEvent(tracker, mLastHoverKeyIndex, false); - mLastHoverKeyIndex = KeyDetector.NOT_A_KEY; - mLastX = -1; - mLastY = -1; - } else if (mLastHoverKeyIndex != KeyDetector.NOT_A_KEY) { - fireKeyPressEvent(tracker, mLastX, mLastY, event.getEventTime()); - } - - return true; } return false; @@ -197,11 +172,6 @@ public class AccessibleKeyboardViewProxy { } } - private void fireKeyPressEvent(PointerTracker tracker, int x, int y, long eventTime) { - tracker.onDownEvent(x, y, eventTime, mView); - tracker.onUpEvent(x, y, eventTime + DELAY_KEY_PRESS); - } - private class KeyboardFlickGestureDetector extends FlickGestureDetector { public KeyboardFlickGestureDetector(Context context) { super(context); diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java index a24195e87..aab52e139 100644 --- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java @@ -624,16 +624,6 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke } @Override - public boolean dispatchTouchEvent(MotionEvent event) { - // Drop non-hover touch events when touch exploration is enabled. - if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { - return false; - } - - return super.dispatchTouchEvent(event); - } - - @Override public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) { final PointerTracker tracker = getPointerTracker(0); |