mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +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();
|
||||
for (Network network : networks) {
|
||||
NetworkInfo info = connMgr.getNetworkInfo(network);
|
||||
if (info == null) {
|
||||
continue;
|
||||
}
|
||||
if (info.getType() == ConnectivityManager.TYPE_MOBILE) {
|
||||
mobile = info.isConnected();
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user