mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Use Arguments.createArray instead of WritableNativeArray
Summary: Using `WriteableNativeArray` directly in common code is breaking unit tests on CircleCI. Changelog: [Android][Internal] - Use mock of native array for sending touches Reviewed By: mdvacca Differential Revision: D31665842 fbshipit-source-id: 886418ff6a3f07046e8e17d4743060d80c26b288
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b60e229d7f
commit
f7a33e3501
@@ -12,7 +12,6 @@ import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.ReactSoftExceptionLogger;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.WritableNativeArray;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
|
||||
/** Class responsible for generating catalyst touch events based on android {@link MotionEvent}. */
|
||||
@@ -187,7 +186,7 @@ public class TouchesHelper {
|
||||
}
|
||||
|
||||
private static WritableArray getWritableArray(boolean copyObjects, WritableMap... objects) {
|
||||
WritableArray result = new WritableNativeArray();
|
||||
WritableArray result = Arguments.createArray();
|
||||
for (WritableMap object : objects) {
|
||||
if (object != null) {
|
||||
result.pushMap(copyObjects ? object.copy() : object);
|
||||
|
||||
Reference in New Issue
Block a user