Skip to content

Commit 9cabe4c

Browse files
authored
Merge pull request #41 from leecrossley/master
Fix Wifi Leak
2 parents 420c704 + d5c375b commit 9cabe4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

android/src/main/java/com/devstepbcn/wifi/AndroidWifiModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class AndroidWifiModule extends ReactContextBaseJavaModule {
4646
//Constructor
4747
public AndroidWifiModule(ReactApplicationContext reactContext) {
4848
super(reactContext);
49-
wifi = (WifiManager)reactContext.getSystemService(Context.WIFI_SERVICE);
49+
wifi = (WifiManager)reactContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
5050
context = (ReactApplicationContext) getReactApplicationContext();
5151
}
5252

0 commit comments

Comments
 (0)