mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-11 10:38:00 +08:00
Convert modules to use @ReactModule instead of getName()
Reviewed By: astreet Differential Revision: D3334273 fbshipit-source-id: a33bf72c5c184844885ef3ef610a05d9c102c8ea
This commit is contained in:
committed by
Facebook Github Bot 2
parent
9965642ebc
commit
c64213653e
@@ -21,7 +21,6 @@ import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.Callback;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
@@ -29,15 +28,15 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
import com.facebook.react.common.MapBuilder;
|
||||
|
||||
@ReactModule(name = "DialogManagerAndroid")
|
||||
public class DialogModule extends ReactContextBaseJavaModule implements LifecycleEventListener {
|
||||
|
||||
/* package */ static final String FRAGMENT_TAG =
|
||||
"com.facebook.catalyst.react.dialog.DialogModule";
|
||||
|
||||
/* package */ static final String NAME = "DialogManagerAndroid";
|
||||
|
||||
/* package */ static final String ACTION_BUTTON_CLICKED = "buttonClicked";
|
||||
/* package */ static final String ACTION_DISMISSED = "dismissed";
|
||||
/* package */ static final String KEY_TITLE = "title";
|
||||
@@ -61,11 +60,6 @@ public class DialogModule extends ReactContextBaseJavaModule implements Lifecycl
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to allow this module to work with both the standard FragmentManager
|
||||
* and the Support FragmentManager (for apps that need to use it for legacy reasons).
|
||||
|
||||
Reference in New Issue
Block a user