mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 17:46:35 +08:00
covert RNFeedPackage and it's modules to use @ReactModule and @ReactModuleList
Reviewed By: lexs Differential Revision: D3796860 fbshipit-source-id: d4b5f3635754ef28277b79cb1ea9bab07ba3ea6e
This commit is contained in:
committed by
Facebook Github Bot 2
parent
6c909ef80d
commit
3d1b79cd15
@@ -23,11 +23,13 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
/**
|
||||
* Module that records debug information during transitions (animated navigation events such as
|
||||
* going from one screen to another).
|
||||
*/
|
||||
@ReactModule(name = "AnimationsDebugModule")
|
||||
public class AnimationsDebugModule extends ReactContextBaseJavaModule {
|
||||
|
||||
private @Nullable FpsDebugFrameCallback mFrameCallback;
|
||||
|
||||
@@ -4,12 +4,13 @@ android_library(
|
||||
name = 'debug',
|
||||
srcs = glob(['**/*.java']),
|
||||
deps = [
|
||||
react_native_target('java/com/facebook/react/bridge:bridge'),
|
||||
react_native_target('java/com/facebook/react/common:common'),
|
||||
react_native_target('java/com/facebook/react/uimanager:uimanager'),
|
||||
react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'),
|
||||
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
|
||||
react_native_dep('third-party/java/jsr-305:jsr-305'),
|
||||
react_native_target('java/com/facebook/react/bridge:bridge'),
|
||||
react_native_target('java/com/facebook/react/common:common'),
|
||||
react_native_target('java/com/facebook/react/module/annotations:annotations'),
|
||||
react_native_target('java/com/facebook/react/uimanager:uimanager'),
|
||||
],
|
||||
visibility = [
|
||||
'PUBLIC',
|
||||
|
||||
@@ -14,15 +14,13 @@ import javax.annotation.Nullable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.facebook.react.bridge.Promise;
|
||||
import com.facebook.react.bridge.BaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
/**
|
||||
* Module that exposes the URL to the source code map (used for exception stack trace parsing) to JS
|
||||
*/
|
||||
@ReactModule(name = "RCTSourceCode")
|
||||
public class SourceCodeModule extends BaseJavaModule {
|
||||
|
||||
private final String mSourceUrl;
|
||||
@@ -38,7 +36,7 @@ public class SourceCodeModule extends BaseJavaModule {
|
||||
|
||||
@Override
|
||||
public @Nullable Map<String, Object> getConstants() {
|
||||
HashMap<String, Object> constants = new HashMap<String, Object>();
|
||||
HashMap<String, Object> constants = new HashMap<>();
|
||||
constants.put("scriptURL", mSourceUrl);
|
||||
return constants;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user