mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-21 02:26:18 +08:00
make HeadlessJsTaskSupportModule lazifiable
Reviewed By: achen1 Differential Revision: D4051137 fbshipit-source-id: 611b3cc36de040cf803b11a8a06ae13c0d9b044c
This commit is contained in:
committed by
Facebook Github Bot
parent
d950db4ef7
commit
c6330a2081
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user