Pass MotionEvent to PointerTracker
This is a one of groundwork to integrate gesture input. Change-Id: I5b75c6978b51df91fdc384a9f6d1d5a5ddc563e2main
parent
7bb8e95b52
commit
3314d38daf
|
@ -762,15 +762,18 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
|
||||||
final PointerTracker tracker = PointerTracker.getPointerTracker(
|
final PointerTracker tracker = PointerTracker.getPointerTracker(
|
||||||
pointerId, this);
|
pointerId, this);
|
||||||
final int px, py;
|
final int px, py;
|
||||||
|
final MotionEvent motionEvent;
|
||||||
if (mMoreKeysPanel != null
|
if (mMoreKeysPanel != null
|
||||||
&& tracker.mPointerId == mMoreKeysPanelPointerTrackerId) {
|
&& tracker.mPointerId == mMoreKeysPanelPointerTrackerId) {
|
||||||
px = mMoreKeysPanel.translateX((int)me.getX(i));
|
px = mMoreKeysPanel.translateX((int)me.getX(i));
|
||||||
py = mMoreKeysPanel.translateY((int)me.getY(i));
|
py = mMoreKeysPanel.translateY((int)me.getY(i));
|
||||||
|
motionEvent = null;
|
||||||
} else {
|
} else {
|
||||||
px = (int)me.getX(i);
|
px = (int)me.getX(i);
|
||||||
py = (int)me.getY(i);
|
py = (int)me.getY(i);
|
||||||
|
motionEvent = me;
|
||||||
}
|
}
|
||||||
tracker.onMoveEvent(px, py, eventTime);
|
tracker.onMoveEvent(px, py, eventTime, motionEvent);
|
||||||
if (ENABLE_USABILITY_STUDY_LOG) {
|
if (ENABLE_USABILITY_STUDY_LOG) {
|
||||||
final float pointerSize = me.getSize(i);
|
final float pointerSize = me.getSize(i);
|
||||||
final float pointerPressure = me.getPressure(i);
|
final float pointerPressure = me.getPressure(i);
|
||||||
|
|
|
@ -473,7 +473,7 @@ public class PointerTracker {
|
||||||
onUpEvent(x, y, eventTime);
|
onUpEvent(x, y, eventTime);
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_MOVE:
|
case MotionEvent.ACTION_MOVE:
|
||||||
onMoveEvent(x, y, eventTime);
|
onMoveEvent(x, y, eventTime, null);
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_CANCEL:
|
case MotionEvent.ACTION_CANCEL:
|
||||||
onCancelEvent(x, y, eventTime);
|
onCancelEvent(x, y, eventTime);
|
||||||
|
@ -553,7 +553,7 @@ public class PointerTracker {
|
||||||
mIsInSlidingKeyInput = true;
|
mIsInSlidingKeyInput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onMoveEvent(int x, int y, long eventTime) {
|
public void onMoveEvent(int x, int y, long eventTime, MotionEvent me) {
|
||||||
if (DEBUG_MOVE_EVENT)
|
if (DEBUG_MOVE_EVENT)
|
||||||
printTouchEvent("onMoveEvent:", x, y, eventTime);
|
printTouchEvent("onMoveEvent:", x, y, eventTime);
|
||||||
if (mKeyAlreadyProcessed)
|
if (mKeyAlreadyProcessed)
|
||||||
|
|
Loading…
Reference in New Issue