mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 22:55:10 +00:00
Fixing crash, apparently info can be null (?)
This commit is contained in:
@@ -23,6 +23,9 @@ public class NetworkHelper {
|
|||||||
Network[] networks = connMgr.getAllNetworks();
|
Network[] networks = connMgr.getAllNetworks();
|
||||||
for (Network network : networks) {
|
for (Network network : networks) {
|
||||||
NetworkInfo info = connMgr.getNetworkInfo(network);
|
NetworkInfo info = connMgr.getNetworkInfo(network);
|
||||||
|
if (info == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (info.getType() == ConnectivityManager.TYPE_MOBILE) {
|
if (info.getType() == ConnectivityManager.TYPE_MOBILE) {
|
||||||
mobile = info.isConnected();
|
mobile = info.isConnected();
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user