From 07a31681d73aef2dedd3897c05243a5d189acf85 Mon Sep 17 00:00:00 2001 From: Aaron Chiu Date: Thu, 11 Aug 2016 15:43:35 -0700 Subject: [PATCH] Convert modules to use @ReactModule instead of getName() Reviewed By: astreet Differential Revision: D3334273 fbshipit-source-id: a33bf72c5c184844885ef3ef610a05d9c102c8ea --- CameraRollManager.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CameraRollManager.java b/CameraRollManager.java index c103f445a..073a01bc1 100644 --- a/CameraRollManager.java +++ b/CameraRollManager.java @@ -50,6 +50,7 @@ import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; import com.facebook.react.bridge.WritableNativeArray; import com.facebook.react.bridge.WritableNativeMap; +import com.facebook.react.bridge.annotations.ReactModule; import com.facebook.react.common.ReactConstants; // TODO #6015104: rename to something less iOSish @@ -57,6 +58,7 @@ import com.facebook.react.common.ReactConstants; * {@link NativeModule} that allows JS to interact with the photos on the device (i.e. * {@link MediaStore.Images}). */ +@ReactModule(name = "RKCameraRollManager") public class CameraRollManager extends ReactContextBaseJavaModule { private static final String ERROR_UNABLE_TO_LOAD = "E_UNABLE_TO_LOAD"; @@ -98,11 +100,6 @@ public class CameraRollManager extends ReactContextBaseJavaModule { super(reactContext); } - @Override - public String getName() { - return "RKCameraRollManager"; - } - @Override public Map getConstants() { return Collections.emptyMap(); @@ -440,5 +437,4 @@ public class CameraRollManager extends ReactContextBaseJavaModule { node.putMap("location", location); } } - }