Removed lift-to-type from LatinIME accessibility.
Bug: 5522854 Change-Id: I32df86450fa0d5dd9606609ea693d0e331b64b19
This commit is contained in:
parent
556a7147c1
commit
166530b195
2 changed files with 0 additions and 40 deletions
|
@ -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,26 +135,9 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
|
|
@ -623,16 +623,6 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
|||
VoiceProxy.getInstance().onAttachedToWindow();
|
||||
}
|
||||
|
||||
@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()) {
|
||||
|
|
Loading…
Reference in a new issue