me.getX(), me.getY(), me.getMetaState());
result = onModifiedTouchEvent(down);
down.recycle();
+ // If it's an up action, then deliver the up as well.
+ if (me.getAction() == MotionEvent.ACTION_UP) {
+ result = onModifiedTouchEvent(me);
+ }
} else {
// Send an up event for the last pointer
MotionEvent up = MotionEvent.obtain(now, now, MotionEvent.ACTION_UP,
if (mGestureDetector.onTouchEvent(me)) {
showPreview(NOT_A_KEY);
mHandler.removeMessages(MSG_REPEAT);
- mHandler.removeMessages(MSG_LONGPRESS);
+ mHandler.removeMessages(MSG_LONGPRESS);
return true;
}
if (keyIndex == mCurrentKey) {
mCurrentKeyTime += eventTime - mLastMoveTime;
continueLongPress = true;
- } else {
+ } else if (mRepeatKeyIndex == NOT_A_KEY) {
resetMultiTap();
mLastKey = mCurrentKey;
mLastCodeX = mLastX;
mCurrentKeyTime = 0;
}
}
- if (keyIndex != mRepeatKeyIndex) {
- mHandler.removeMessages(MSG_REPEAT);
- mRepeatKeyIndex = NOT_A_KEY;
- }
}
if (!continueLongPress) {
// Cancel old longpress
mHandler.sendMessageDelayed(msg, LONGPRESS_TIMEOUT);
}
}
- showPreview(keyIndex);
+ showPreview(mCurrentKey);
break;
case MotionEvent.ACTION_UP: