```java
return activeNetwork != null && activeNetwork.isConnected();
```