Update the timestamp we send in touch events to be the more accurate timestamp we use

Summary: Use the more accurate timestamp that we have computed for the touch event rather than the event timestamp that Android provides.

Reviewed By: andreicoman11

Differential Revision: D3292705

fbshipit-source-id: dad082ab74406d391481d16cdac19629751aa1eb
This commit is contained in:
Dave Miller
2016-05-12 09:39:39 -07:00
committed by Facebook Github Bot 0
parent 2525feb37f
commit f2c1868b56
2 changed files with 12 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ import com.facebook.react.uimanager.PixelUtil;
touch.putDouble(LOCATION_X_KEY, PixelUtil.toDIPFromPixel(locationX));
touch.putDouble(LOCATION_Y_KEY, PixelUtil.toDIPFromPixel(locationY));
touch.putInt(TARGET_KEY, reactTarget);
touch.putDouble(TIMESTAMP_KEY, motionEvent.getEventTime());
touch.putDouble(TIMESTAMP_KEY, event.getTimestampMs());
touch.putDouble(POINTER_IDENTIFIER_KEY, motionEvent.getPointerId(index));
touches.pushMap(touch);
}