diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TextInputTestCase.java b/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TextInputTestCase.java index 9558a5d91..40aa97813 100644 --- a/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TextInputTestCase.java +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/tests/TextInputTestCase.java @@ -16,7 +16,6 @@ import android.view.ViewGroup; import android.widget.EditText; import com.facebook.react.bridge.JavaScriptModule; -import com.facebook.react.common.SystemClock; import com.facebook.react.testing.ReactAppInstrumentationTestCase; import com.facebook.react.testing.ReactInstanceSpecForTest; import com.facebook.react.uimanager.PixelUtil; @@ -116,7 +115,6 @@ public class TextInputTestCase extends ReactAppInstrumentationTestCase { eventDispatcher.dispatchEvent( new ReactTextChangedEvent( reactEditText.getId(), - SystemClock.nanoTime(), newText.toString(), (int) PixelUtil.toDIPFromPixel(contentWidth), (int) PixelUtil.toDIPFromPixel(contentHeight), @@ -125,7 +123,6 @@ public class TextInputTestCase extends ReactAppInstrumentationTestCase { eventDispatcher.dispatchEvent( new ReactTextInputEvent( reactEditText.getId(), - SystemClock.nanoTime(), newText.toString(), "", start, @@ -150,7 +147,6 @@ public class TextInputTestCase extends ReactAppInstrumentationTestCase { eventDispatcher.dispatchEvent( new ReactTextChangedEvent( reactEditText.getId(), - SystemClock.nanoTime(), newText.toString(), (int) PixelUtil.toDIPFromPixel(contentWidth), (int) PixelUtil.toDIPFromPixel(contentHeight), @@ -159,7 +155,6 @@ public class TextInputTestCase extends ReactAppInstrumentationTestCase { eventDispatcher.dispatchEvent( new ReactTextInputEvent( reactEditText.getId(), - SystemClock.nanoTime(), moreText, "", start, @@ -184,7 +179,6 @@ public class TextInputTestCase extends ReactAppInstrumentationTestCase { eventDispatcher.dispatchEvent( new ReactTextChangedEvent( reactEditText.getId(), - SystemClock.nanoTime(), newText.toString(), (int) PixelUtil.toDIPFromPixel(contentWidth), (int) PixelUtil.toDIPFromPixel(contentHeight), @@ -193,7 +187,6 @@ public class TextInputTestCase extends ReactAppInstrumentationTestCase { eventDispatcher.dispatchEvent( new ReactTextInputEvent( reactEditText.getId(), - SystemClock.nanoTime(), moreText, "", start, diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java index bbe5fc995..97d366a53 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.java @@ -15,7 +15,6 @@ import android.view.ViewGroup; import com.facebook.common.logging.FLog; import com.facebook.infer.annotation.Assertions; import com.facebook.react.common.ReactConstants; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.react.uimanager.events.TouchEvent; import com.facebook.react.uimanager.events.TouchEventCoalescingKeyHelper; @@ -82,7 +81,6 @@ public class JSTouchDispatcher { eventDispatcher.dispatchEvent( TouchEvent.obtain( mTargetTag, - SystemClock.nanoTime(), TouchEventType.START, ev, mTargetCoordinates[0], @@ -105,7 +103,6 @@ public class JSTouchDispatcher { eventDispatcher.dispatchEvent( TouchEvent.obtain( mTargetTag, - SystemClock.nanoTime(), TouchEventType.END, ev, mTargetCoordinates[0], @@ -117,7 +114,6 @@ public class JSTouchDispatcher { eventDispatcher.dispatchEvent( TouchEvent.obtain( mTargetTag, - SystemClock.nanoTime(), TouchEventType.MOVE, ev, mTargetCoordinates[0], @@ -128,7 +124,6 @@ public class JSTouchDispatcher { eventDispatcher.dispatchEvent( TouchEvent.obtain( mTargetTag, - SystemClock.nanoTime(), TouchEventType.START, ev, mTargetCoordinates[0], @@ -139,7 +134,6 @@ public class JSTouchDispatcher { eventDispatcher.dispatchEvent( TouchEvent.obtain( mTargetTag, - SystemClock.nanoTime(), TouchEventType.END, ev, mTargetCoordinates[0], @@ -180,7 +174,6 @@ public class JSTouchDispatcher { Assertions.assertNotNull(eventDispatcher).dispatchEvent( TouchEvent.obtain( mTargetTag, - SystemClock.nanoTime(), TouchEventType.CANCEL, androidEvent, mTargetCoordinates[0], diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.java index c2b5c8a6e..118a1bbdc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.java @@ -13,7 +13,6 @@ import android.support.v4.util.Pools; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.WritableMap; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.events.Event; import com.facebook.react.uimanager.events.RCTEventEmitter; @@ -45,7 +44,7 @@ public class OnLayoutEvent extends Event { } protected void init(int viewTag, int x, int y, int width, int height) { - super.init(viewTag, SystemClock.nanoTime()); + super.init(viewTag); mX = x; mY = y; mWidth = width; diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java index 40c2845c8..d54e6ab6a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java @@ -9,6 +9,8 @@ package com.facebook.react.uimanager.events; +import com.facebook.react.common.SystemClock; + /** * A UI event that can be dispatched to JS. * @@ -28,16 +30,16 @@ public abstract class Event { protected Event() { } - protected Event(int viewTag, long timestampMs) { - init(viewTag, timestampMs); + protected Event(int viewTag) { + init(viewTag); } /** * This method needs to be called before event is sent to event dispatcher. */ - protected void init(int viewTag, long timestampMs) { + protected void init(int viewTag) { mViewTag = viewTag; - mTimestampMs = timestampMs; + mTimestampMs = SystemClock.nanoTime(); mInitialized = true; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.java index a7df8fb3e..0262f0bd0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEvent.java @@ -33,7 +33,6 @@ public class TouchEvent extends Event { public static TouchEvent obtain( int viewTag, - long timestampMs, TouchEventType touchEventType, MotionEvent motionEventToCopy, float viewX, @@ -45,7 +44,6 @@ public class TouchEvent extends Event { } event.init( viewTag, - timestampMs, touchEventType, motionEventToCopy, viewX, @@ -67,13 +65,12 @@ public class TouchEvent extends Event { private void init( int viewTag, - long timestampMs, TouchEventType touchEventType, MotionEvent motionEventToCopy, float viewX, float viewY, TouchEventCoalescingKeyHelper touchEventCoalescingKeyHelper) { - super.init(viewTag, timestampMs); + super.init(viewTag); short coalescingKey = 0; int action = (motionEventToCopy.getAction() & MotionEvent.ACTION_MASK); diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java index 0595d0fd0..0014b9526 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayoutManager.java @@ -26,7 +26,6 @@ import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.common.MapBuilder; import com.facebook.react.common.ReactConstants; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.UIManagerModule; @@ -188,25 +187,25 @@ public class ReactDrawerLayoutManager extends ViewGroupManager { public static final String EVENT_NAME = "topDrawerClosed"; - public DrawerClosedEvent(int viewId, long timestampMs) { - super(viewId, timestampMs); + public DrawerClosedEvent(int viewId) { + super(viewId); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.java index 916c301c9..b94d5937a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerOpenedEvent.java @@ -17,8 +17,8 @@ public class DrawerOpenedEvent extends Event { public static final String EVENT_NAME = "topDrawerOpened"; - public DrawerOpenedEvent(int viewId, long timestampMs) { - super(viewId, timestampMs); + public DrawerOpenedEvent(int viewId) { + super(viewId); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.java index b35bbc8d0..5010ee6be 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerSlideEvent.java @@ -23,8 +23,8 @@ public class DrawerSlideEvent extends Event { private final float mOffset; - public DrawerSlideEvent(int viewId, long timestampMs, float offset) { - super(viewId, timestampMs); + public DrawerSlideEvent(int viewId, float offset) { + super(viewId); mOffset = offset; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.java index dc6c9cd9c..a4d929487 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/events/DrawerStateChangedEvent.java @@ -20,8 +20,8 @@ public class DrawerStateChangedEvent extends Event { private final int mDrawerState; - public DrawerStateChangedEvent(int viewId, long timestampMs, int drawerState) { - super(viewId, timestampMs); + public DrawerStateChangedEvent(int viewId, int drawerState) { + super(viewId); mDrawerState = drawerState; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java index 7dde489d8..cee5ebc34 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageLoadEvent.java @@ -37,16 +37,15 @@ public class ImageLoadEvent extends Event { private final int mEventType; private final @Nullable String mImageUri; - public ImageLoadEvent(int viewId, long timestampMs, @ImageEventType int eventType) { - this(viewId, timestampMs, eventType, null); + public ImageLoadEvent(int viewId, @ImageEventType int eventType) { + this(viewId, eventType, null); } public ImageLoadEvent( int viewId, - long timestampMs, @ImageEventType int eventType, @Nullable String imageUri) { - super(viewId, timestampMs); + super(viewId); mEventType = eventType; mImageUri = imageUri; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java index a864b140c..ad3ac5cf9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java @@ -51,7 +51,6 @@ import com.facebook.imagepipeline.request.Postprocessor; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.events.EventDispatcher; @@ -192,7 +191,7 @@ public class ReactImageView extends GenericDraweeView { @Override public void onSubmit(String id, Object callerContext) { mEventDispatcher.dispatchEvent( - new ImageLoadEvent(getId(), SystemClock.nanoTime(), ImageLoadEvent.ON_LOAD_START)); + new ImageLoadEvent(getId(), ImageLoadEvent.ON_LOAD_START)); } @Override @@ -202,18 +201,18 @@ public class ReactImageView extends GenericDraweeView { @Nullable Animatable animatable) { if (imageInfo != null) { mEventDispatcher.dispatchEvent( - new ImageLoadEvent(getId(), SystemClock.nanoTime(), ImageLoadEvent.ON_LOAD)); + new ImageLoadEvent(getId(), ImageLoadEvent.ON_LOAD)); mEventDispatcher.dispatchEvent( - new ImageLoadEvent(getId(), SystemClock.nanoTime(), ImageLoadEvent.ON_LOAD_END)); + new ImageLoadEvent(getId(), ImageLoadEvent.ON_LOAD_END)); } } @Override public void onFailure(String id, Throwable throwable) { mEventDispatcher.dispatchEvent( - new ImageLoadEvent(getId(), SystemClock.nanoTime(), ImageLoadEvent.ON_ERROR)); + new ImageLoadEvent(getId(), ImageLoadEvent.ON_ERROR)); mEventDispatcher.dispatchEvent( - new ImageLoadEvent(getId(), SystemClock.nanoTime(), ImageLoadEvent.ON_LOAD_END)); + new ImageLoadEvent(getId(), ImageLoadEvent.ON_LOAD_END)); } }; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java index 2fb42c594..52fc41ad3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.java @@ -17,7 +17,6 @@ import android.content.DialogInterface; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.common.MapBuilder; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.LayoutShadowNode; import com.facebook.react.uimanager.PixelUtil; import com.facebook.react.uimanager.ThemedReactContext; @@ -85,14 +84,14 @@ public class ReactModalHostManager extends ViewGroupManager new ReactModalHostView.OnRequestCloseListener() { @Override public void onRequestClose(DialogInterface dialog) { - dispatcher.dispatchEvent(new RequestCloseEvent(view.getId(), SystemClock.nanoTime())); + dispatcher.dispatchEvent(new RequestCloseEvent(view.getId())); } }); view.setOnShowListener( new DialogInterface.OnShowListener() { @Override public void onShow(DialogInterface dialog) { - dispatcher.dispatchEvent(new ShowEvent(view.getId(), SystemClock.nanoTime())); + dispatcher.dispatchEvent(new ShowEvent(view.getId())); } }); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/modal/RequestCloseEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/modal/RequestCloseEvent.java index 0ddf35fb6..133488760 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/modal/RequestCloseEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/modal/RequestCloseEvent.java @@ -19,8 +19,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; public static final String EVENT_NAME = "topRequestClose"; - protected RequestCloseEvent(int viewTag, long timestampMs) { - super(viewTag, timestampMs); + protected RequestCloseEvent(int viewTag) { + super(viewTag); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/modal/ShowEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/modal/ShowEvent.java index 2c447b746..a0851ccf7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/modal/ShowEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/modal/ShowEvent.java @@ -19,8 +19,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; public static final String EVENT_NAME = "topShow"; - protected ShowEvent(int viewTag, long timestampMs) { - super(viewTag, timestampMs); + protected ShowEvent(int viewTag) { + super(viewTag); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPickerManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPickerManager.java index 11ea4c839..5e1e9ccf3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPickerManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/picker/ReactPickerManager.java @@ -22,7 +22,6 @@ import android.widget.TextView; import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.ReadableMap; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.UIManagerModule; @@ -157,7 +156,7 @@ public abstract class ReactPickerManager extends SimpleViewManager @Override public void onItemSelected(int position) { mEventDispatcher.dispatchEvent( new PickerItemSelectEvent( - mReactPicker.getId(), SystemClock.nanoTime(), position)); + mReactPicker.getId(), position)); } } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/picker/events/PickerItemSelectEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/picker/events/PickerItemSelectEvent.java index cabe53fdc..3eb45f48b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/picker/events/PickerItemSelectEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/picker/events/PickerItemSelectEvent.java @@ -19,8 +19,8 @@ public class PickerItemSelectEvent extends Event { private final int mPosition; - public PickerItemSelectEvent(int id, long uptimeMillis, int position) { - super(id, uptimeMillis); + public PickerItemSelectEvent(int id, int position) { + super(id); mPosition = position; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/ContentSizeChangeEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/ContentSizeChangeEvent.java index e7941872c..d7ec7e48f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/ContentSizeChangeEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/ContentSizeChangeEvent.java @@ -19,8 +19,8 @@ public class ContentSizeChangeEvent extends Event { private final int mWidth; private final int mHeight; - public ContentSizeChangeEvent(int viewTag, long timestampMs, int width, int height) { - super(viewTag, timestampMs); + public ContentSizeChangeEvent(int viewTag, int width, int height) { + super(viewTag); mWidth = width; mHeight = height; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/RecyclerViewBackedScrollView.java b/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/RecyclerViewBackedScrollView.java index df3f2c575..a9d64b95a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/RecyclerViewBackedScrollView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/RecyclerViewBackedScrollView.java @@ -14,7 +14,6 @@ import android.view.ViewGroup; import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.ReactContext; -import com.facebook.react.common.SystemClock; import com.facebook.react.common.annotations.VisibleForTesting; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.events.NativeGestureUtil; @@ -344,7 +343,6 @@ public class RecyclerViewBackedScrollView extends RecyclerView { ((ReactContext) getContext()).getNativeModule(UIManagerModule.class).getEventDispatcher() .dispatchEvent(ScrollEvent.obtain( getId(), - SystemClock.nanoTime(), ScrollEventType.SCROLL, 0, /* offsetX = 0, horizontal scrolling only */ calculateAbsoluteOffset(), @@ -359,7 +357,6 @@ public class RecyclerViewBackedScrollView extends RecyclerView { ((ReactContext) getContext()).getNativeModule(UIManagerModule.class).getEventDispatcher() .dispatchEvent(new ContentSizeChangeEvent( getId(), - SystemClock.nanoTime(), getWidth(), newTotalChildrenHeight)); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java index fd46f677b..966c50bb3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.java @@ -13,7 +13,6 @@ import android.view.View; import android.view.ViewGroup; import com.facebook.react.bridge.ReactContext; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.UIManagerModule; /** @@ -57,7 +56,6 @@ public class ReactScrollViewHelper { reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher().dispatchEvent( ScrollEvent.obtain( scrollView.getId(), - SystemClock.nanoTime(), scrollEventType, scrollView.getScrollX(), scrollView.getScrollY(), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.java index dde0a6018..25606a489 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEvent.java @@ -40,7 +40,6 @@ public class ScrollEvent extends Event { public static ScrollEvent obtain( int viewTag, - long timestampMs, ScrollEventType scrollEventType, int scrollX, int scrollY, @@ -54,7 +53,6 @@ public class ScrollEvent extends Event { } event.init( viewTag, - timestampMs, scrollEventType, scrollX, scrollY, @@ -75,7 +73,6 @@ public class ScrollEvent extends Event { private void init( int viewTag, - long timestampMs, ScrollEventType scrollEventType, int scrollX, int scrollY, @@ -83,7 +80,7 @@ public class ScrollEvent extends Event { int contentHeight, int scrollViewWidth, int scrollViewHeight) { - super.init(viewTag, timestampMs); + super.init(viewTag); mScrollEventType = scrollEventType; mScrollX = scrollX; mScrollY = scrollY; diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderEvent.java index 20448246d..f45dc71f3 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderEvent.java @@ -24,8 +24,8 @@ public class ReactSliderEvent extends Event { private final double mValue; private final boolean mFromUser; - public ReactSliderEvent(int viewId, long timestampMs, double value, boolean fromUser) { - super(viewId, timestampMs); + public ReactSliderEvent(int viewId, double value, boolean fromUser) { + super(viewId); mValue = value; mFromUser = fromUser; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java index ec3f66d80..d02771d3e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java @@ -20,7 +20,6 @@ import com.facebook.csslayout.CSSNode; import com.facebook.csslayout.MeasureOutput; import com.facebook.react.bridge.ReactContext; import com.facebook.react.common.MapBuilder; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.LayoutShadowNode; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; @@ -81,7 +80,6 @@ public class ReactSliderManager extends SimpleViewManager { reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher().dispatchEvent( new ReactSliderEvent( seekbar.getId(), - SystemClock.nanoTime(), ((ReactSlider)seekbar).toRealProgress(progress), fromUser)); } @@ -96,7 +94,6 @@ public class ReactSliderManager extends SimpleViewManager { reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher().dispatchEvent( new ReactSlidingCompleteEvent( seekbar.getId(), - SystemClock.nanoTime(), ((ReactSlider)seekbar).toRealProgress(seekbar.getProgress()))); } }; diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlidingCompleteEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlidingCompleteEvent.java index d9a698d75..1dceb63ee 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlidingCompleteEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSlidingCompleteEvent.java @@ -23,8 +23,8 @@ public class ReactSlidingCompleteEvent extends Event private final double mValue; - public ReactSlidingCompleteEvent(int viewId, long timestampMs, double value) { - super(viewId, timestampMs); + public ReactSlidingCompleteEvent(int viewId, double value) { + super(viewId); mValue = value; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.java index d8325d2bc..0745d2adb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/RefreshEvent.java @@ -14,8 +14,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; public class RefreshEvent extends Event { - protected RefreshEvent(int viewTag, long timestampMs) { - super(viewTag, timestampMs); + protected RefreshEvent(int viewTag) { + super(viewTag); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java index 1ae2bacf5..c3ff029b5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager.java @@ -19,7 +19,6 @@ import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.common.MapBuilder; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.ViewGroupManager; @@ -89,7 +88,7 @@ public class SwipeRefreshLayoutManager extends ViewGroupManager { reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher().dispatchEvent( new ReactSwitchEvent( buttonView.getId(), - SystemClock.nanoTime(), isChecked)); } }; diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.java index a5d0ef219..73839812c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactContentSizeChangedEvent.java @@ -26,10 +26,9 @@ public class ReactContentSizeChangedEvent extends Event { public ReactContentSizeChangedEvent( int viewId, - long timestampMs, int contentSizeWidth, int contentSizeHeight) { - super(viewId, timestampMs); + super(viewId); mContentWidth = contentSizeWidth; mContentHeight = contentSizeHeight; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java index 268b5c465..2345f15c5 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextChangedEvent.java @@ -29,12 +29,11 @@ public class ReactTextChangedEvent extends Event { public ReactTextChangedEvent( int viewId, - long timestampMs, String text, int contentSizeWidth, int contentSizeHeight, int eventCount) { - super(viewId, timestampMs); + super(viewId); mText = text; mContentWidth = contentSizeWidth; mContentHeight = contentSizeHeight; diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputBlurEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputBlurEvent.java index 2b77c3140..a51d01677 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputBlurEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputBlurEvent.java @@ -21,10 +21,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; private static final String EVENT_NAME = "topBlur"; - public ReactTextInputBlurEvent( - int viewId, - long timestampMs) { - super(viewId, timestampMs); + public ReactTextInputBlurEvent(int viewId) { + super(viewId); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEndEditingEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEndEditingEvent.java index ff99d68f7..9c6975cf7 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEndEditingEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEndEditingEvent.java @@ -26,9 +26,8 @@ class ReactTextInputEndEditingEvent extends Event public ReactTextInputEndEditingEvent( int viewId, - long timestampMs, String text) { - super(viewId, timestampMs); + super(viewId); mText = text; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java index 3d8f4ccbb..caab8c136 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputEvent.java @@ -29,12 +29,11 @@ public class ReactTextInputEvent extends Event { public ReactTextInputEvent( int viewId, - long timestampMs, String text, String previousText, int rangeStart, int rangeEnd) { - super(viewId, timestampMs); + super(viewId); mText = text; mPreviousText = previousText; mRangeStart = rangeStart; diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputFocusEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputFocusEvent.java index e593e851e..3ca67c3d9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputFocusEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputFocusEvent.java @@ -21,10 +21,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; private static final String EVENT_NAME = "topFocus"; - public ReactTextInputFocusEvent( - int viewId, - long timestampMs) { - super(viewId, timestampMs); + public ReactTextInputFocusEvent(int viewId) { + super(viewId); } @Override diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java index f8c42d920..f1ad86b33 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java @@ -33,7 +33,6 @@ import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.common.MapBuilder; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.BaseViewManager; import com.facebook.react.uimanager.LayoutShadowNode; import com.facebook.react.uimanager.PixelUtil; @@ -578,7 +577,6 @@ public class ReactTextInputManager extends BaseViewManager { @Override public void onClick(View v) { mEventDispatcher.dispatchEvent( - new ToolbarClickEvent(view.getId(), SystemClock.nanoTime(), -1)); + new ToolbarClickEvent(view.getId(), -1)); } }); @@ -142,7 +141,6 @@ public class ReactToolbarManager extends ViewGroupManager { mEventDispatcher.dispatchEvent( new ToolbarClickEvent( view.getId(), - SystemClock.nanoTime(), menuItem.getOrder())); return true; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/events/ToolbarClickEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/events/ToolbarClickEvent.java index 4e6bfa0ff..2391a2147 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/events/ToolbarClickEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/events/ToolbarClickEvent.java @@ -22,8 +22,8 @@ public class ToolbarClickEvent extends Event { private static final String EVENT_NAME = "topSelect"; private final int position; - public ToolbarClickEvent(int viewId, long timestampMs, int position) { - super(viewId, timestampMs); + public ToolbarClickEvent(int viewId, int position) { + super(viewId); this.position = position; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollEvent.java index 2bd0503bf..79a4cca91 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollEvent.java @@ -31,8 +31,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; private final int mPosition; private final float mOffset; - protected PageScrollEvent(int viewTag, long timestampMs, int position, float offset) { - super(viewTag, timestampMs); + protected PageScrollEvent(int viewTag, int position, float offset) { + super(viewTag); mPosition = position; mOffset = offset; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollStateChangedEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollStateChangedEvent.java index 668c0337e..d3a5a7c4a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollStateChangedEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageScrollStateChangedEvent.java @@ -26,8 +26,8 @@ class PageScrollStateChangedEvent extends Event { private final String mPageScrollState; - protected PageScrollStateChangedEvent(int viewTag, long timestampMs, String pageScrollState) { - super(viewTag, timestampMs); + protected PageScrollStateChangedEvent(int viewTag, String pageScrollState) { + super(viewTag); mPageScrollState = pageScrollState; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageSelectedEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageSelectedEvent.java index 0b68dcbed..6145c0823 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageSelectedEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/PageSelectedEvent.java @@ -26,8 +26,8 @@ import com.facebook.react.uimanager.events.RCTEventEmitter; private final int mPosition; - protected PageSelectedEvent(int viewTag, long timestampMs, int position) { - super(viewTag, timestampMs); + protected PageSelectedEvent(int viewTag, int position) { + super(viewTag); mPosition = position; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java index f53b84517..3f9d8961a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/ReactViewPager.java @@ -19,7 +19,6 @@ import android.view.View; import android.view.ViewGroup; import com.facebook.react.bridge.ReactContext; -import com.facebook.react.common.SystemClock; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.events.EventDispatcher; import com.facebook.react.uimanager.events.NativeGestureUtil; @@ -95,14 +94,14 @@ import com.facebook.react.uimanager.events.NativeGestureUtil; @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { mEventDispatcher.dispatchEvent( - new PageScrollEvent(getId(), SystemClock.nanoTime(), position, positionOffset)); + new PageScrollEvent(getId(), position, positionOffset)); } @Override public void onPageSelected(int position) { if (!mIsCurrentItemFromJs) { mEventDispatcher.dispatchEvent( - new PageSelectedEvent(getId(), SystemClock.nanoTime(), position)); + new PageSelectedEvent(getId(), position)); } } @@ -123,7 +122,7 @@ import com.facebook.react.uimanager.events.NativeGestureUtil; throw new IllegalStateException("Unsupported pageScrollState"); } mEventDispatcher.dispatchEvent( - new PageScrollStateChangedEvent(getId(), SystemClock.nanoTime(), pageScrollState)); + new PageScrollStateChangedEvent(getId(), pageScrollState)); } } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java index 9f4c5a7ad..04ad34ce9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/ReactWebViewManager.java @@ -34,7 +34,6 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.ReadableMapKeySetIterator; import com.facebook.react.bridge.WritableMap; import com.facebook.react.common.MapBuilder; -import com.facebook.react.common.SystemClock; import com.facebook.react.common.build.ReactBuildConfig; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; @@ -110,7 +109,6 @@ public class ReactWebViewManager extends SimpleViewManager { webView, new TopLoadingStartEvent( webView.getId(), - SystemClock.nanoTime(), createWebViewEvent(webView, url))); } @@ -145,7 +143,7 @@ public class ReactWebViewManager extends SimpleViewManager { dispatchEvent( webView, - new TopLoadingErrorEvent(webView.getId(), SystemClock.nanoTime(), eventData)); + new TopLoadingErrorEvent(webView.getId(), eventData)); } @Override @@ -156,7 +154,6 @@ public class ReactWebViewManager extends SimpleViewManager { webView, new TopLoadingStartEvent( webView.getId(), - SystemClock.nanoTime(), createWebViewEvent(webView, url))); } @@ -165,7 +162,6 @@ public class ReactWebViewManager extends SimpleViewManager { webView, new TopLoadingFinishEvent( webView.getId(), - SystemClock.nanoTime(), createWebViewEvent(webView, url))); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingErrorEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingErrorEvent.java index 4c32cab15..795b29f69 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingErrorEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingErrorEvent.java @@ -21,8 +21,8 @@ public class TopLoadingErrorEvent extends Event { public static final String EVENT_NAME = "topLoadingError"; private WritableMap mEventData; - public TopLoadingErrorEvent(int viewId, long timestampMs, WritableMap eventData) { - super(viewId, timestampMs); + public TopLoadingErrorEvent(int viewId, WritableMap eventData) { + super(viewId); mEventData = eventData; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingFinishEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingFinishEvent.java index f970a80f9..e858fbc17 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingFinishEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingFinishEvent.java @@ -21,8 +21,8 @@ public class TopLoadingFinishEvent extends Event { public static final String EVENT_NAME = "topLoadingFinish"; private WritableMap mEventData; - public TopLoadingFinishEvent(int viewId, long timestampMs, WritableMap eventData) { - super(viewId, timestampMs); + public TopLoadingFinishEvent(int viewId, WritableMap eventData) { + super(viewId); mEventData = eventData; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingStartEvent.java b/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingStartEvent.java index df54394c6..171cf6e65 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingStartEvent.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/events/TopLoadingStartEvent.java @@ -21,8 +21,8 @@ public class TopLoadingStartEvent extends Event { public static final String EVENT_NAME = "topLoadingStart"; private WritableMap mEventData; - public TopLoadingStartEvent(int viewId, long timestampMs, WritableMap eventData) { - super(viewId, timestampMs); + public TopLoadingStartEvent(int viewId, WritableMap eventData) { + super(viewId); mEventData = eventData; }