Fixing CB-1521 - NullPointerException on Default Jellybean Emulator

This commit is contained in:
Joe Bowser 2012-09-21 11:48:33 -07:00
parent 7eb12110d1
commit 2a9582ebb1

View File

@ -99,6 +99,8 @@ public class NetworkManager extends Plugin {
@SuppressWarnings("deprecation")
@Override
public void onReceive(Context context, Intent intent) {
// (The null check is for the ARM Emulator, please use Intel Emulator for better results)
if(webView != null)
updateConnectionInfo((NetworkInfo) intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO));
}
};
@ -198,7 +200,6 @@ public class NetworkManager extends Plugin {
result.setKeepCallback(true);
this.success(result, this.connectionCallbackId);
// Send to all plugins
webView.postMessage("networkconnection", type);
}