mirror of
https://github.com/status-im/react-native.git
synced 2025-02-28 17:10:50 +00:00
make HeadlessJsTaskSupportModule lazifiable
Reviewed By: achen1 Differential Revision: D4051137 fbshipit-source-id: 611b3cc36de040cf803b11a8a06ae13c0d9b044c
This commit is contained in:
parent
d950db4ef7
commit
c6330a2081
@ -55,6 +55,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_UI_MANAGER_M
|
||||
@ReactModuleList({
|
||||
AnimationsDebugModule.class,
|
||||
AndroidInfoModule.class,
|
||||
HeadlessJsTaskSupportModule.class,
|
||||
DeviceEventManagerModule.class,
|
||||
ExceptionsManagerModule.class,
|
||||
Timing.class,
|
||||
|
@ -13,20 +13,24 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.jstasks.HeadlessJsTaskContext;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
|
||||
/**
|
||||
* Simple native module that allows JS to notify native of having completed some task work, so that
|
||||
* it can e.g. release any resources, stop timers etc.
|
||||
*/
|
||||
@ReactModule(name = HeadlessJsTaskSupportModule.MODULE_NAME)
|
||||
public class HeadlessJsTaskSupportModule extends ReactContextBaseJavaModule {
|
||||
|
||||
protected static final String MODULE_NAME = "HeadlessJsTaskSupport";
|
||||
|
||||
public HeadlessJsTaskSupportModule(ReactApplicationContext reactContext) {
|
||||
super(reactContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "HeadlessJsTaskSupport";
|
||||
return MODULE_NAME;
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user