diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.java b/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.java index 527db0ace2e544..7bf8569d7bc00c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactPackage.java @@ -34,10 +34,12 @@ public interface ReactPackage { * @param reactContext react application context that can be used to create modules * @return list of native modules to register with the newly created catalyst instance */ + @Nonnull List createNativeModules(@Nonnull ReactApplicationContext reactContext); /** * @return a list of view managers that should be registered with {@link UIManagerModule} */ + @Nonnull List createViewManagers(@Nonnull ReactApplicationContext reactContext); } diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java index 56109af8af0ec1..c78527208ccbc0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.java @@ -7,6 +7,7 @@ package com.facebook.react.modules.core; +import javax.annotation.Nonnull; import javax.annotation.Nullable; import android.net.Uri; @@ -27,7 +28,7 @@ public class DeviceEventManagerModule extends ReactContextBaseJavaModule { public static final String NAME = "DeviceEventManager"; public interface RCTDeviceEventEmitter extends JavaScriptModule { - void emit(String eventName, @Nullable Object data); + void emit(@Nonnull String eventName, @Nullable Object data); } private final Runnable mInvokeDefaultBackPressRunnable;