增加空指针保护

hdrplus
Matthew 1 year ago
parent 80bc9af982
commit 1532a14c0f

@ -148,7 +148,7 @@ public class AppMaster {
for (int idx = 0; idx < 8; idx++) { for (int idx = 0; idx < 8; idx++) {
Network network = connectivityManager.getActiveNetwork(); Network network = connectivityManager.getActiveNetwork();
if (!network.equals(previousNetwork)) { if (network != null && !network.equals(previousNetwork)) {
mService.logger.info("Network Changed from " + previousNetworkStr + " to " + network.toString()); mService.logger.info("Network Changed from " + previousNetworkStr + " to " + network.toString());
break; break;
} }

Loading…
Cancel
Save