mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-06 18:00:40 +08:00
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:
committed by
Facebook Github Bot 0
parent
2525feb37f
commit
f2c1868b56
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user