mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-19 11:38:35 +08:00
Reverted commit D3334273
Reviewed By: astreet Differential Revision: D3334273 fbshipit-source-id: a3849604ea89db74900850c294685e7da9aeeacc
This commit is contained in:
committed by
Facebook Github Bot 7
parent
757ab0b936
commit
705daabbb1
@@ -24,14 +24,12 @@ import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
||||
import com.facebook.react.bridge.ReactMethod;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.facebook.react.bridge.WritableNativeMap;
|
||||
import com.facebook.react.bridge.annotations.ReactModule;
|
||||
|
||||
import static com.facebook.react.modules.core.DeviceEventManagerModule.RCTDeviceEventEmitter;
|
||||
|
||||
/**
|
||||
* Module that monitors and provides information about the connectivity state of the device.
|
||||
*/
|
||||
@ReactModule(name = "NetInfo")
|
||||
public class NetInfoModule extends ReactContextBaseJavaModule
|
||||
implements LifecycleEventListener {
|
||||
|
||||
@@ -75,6 +73,11 @@ public class NetInfoModule extends ReactContextBaseJavaModule
|
||||
getReactApplicationContext().addLifecycleEventListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "NetInfo";
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
public void getCurrentConnectivity(Promise promise) {
|
||||
if (mNoNetworkPermission) {
|
||||
|
||||
Reference in New Issue
Block a user