Merge "Pass MotionEvent to PointerTracker"

main
Tadashi G. Takaoka 2012-06-26 03:16:12 -07:00 committed by Android (Google) Code Review
commit 342ea3d324
2 changed files with 6 additions and 3 deletions

View File

@ -762,15 +762,18 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
final PointerTracker tracker = PointerTracker.getPointerTracker(
pointerId, this);
final int px, py;
final MotionEvent motionEvent;
if (mMoreKeysPanel != null
&& tracker.mPointerId == mMoreKeysPanelPointerTrackerId) {
px = mMoreKeysPanel.translateX((int)me.getX(i));
py = mMoreKeysPanel.translateY((int)me.getY(i));
motionEvent = null;
} else {
px = (int)me.getX(i);
py = (int)me.getY(i);
motionEvent = me;
}
tracker.onMoveEvent(px, py, eventTime);
tracker.onMoveEvent(px, py, eventTime, motionEvent);
if (ENABLE_USABILITY_STUDY_LOG) {
final float pointerSize = me.getSize(i);
final float pointerPressure = me.getPressure(i);

View File

@ -473,7 +473,7 @@ public class PointerTracker {
onUpEvent(x, y, eventTime);
break;
case MotionEvent.ACTION_MOVE:
onMoveEvent(x, y, eventTime);
onMoveEvent(x, y, eventTime, null);
break;
case MotionEvent.ACTION_CANCEL:
onCancelEvent(x, y, eventTime);
@ -553,7 +553,7 @@ public class PointerTracker {
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)
printTouchEvent("onMoveEvent:", x, y, eventTime);
if (mKeyAlreadyProcessed)