Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8935ab5d authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Fix crash when fragment.getContext() was null

parent c5a9e7e3
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kde.kdeconnect_tp"
android:versionCode="1620"
android:versionCode="1621"
android:versionName="1.6.2">
<uses-sdk android:minSdkVersion="9"
......
......@@ -8,7 +8,7 @@ import android.net.NetworkInfo;
public class NetworkHelper {
public static boolean isOnMobileNetwork(Context context) {
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
if (context == null || android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.LOLLIPOP) {
return false; //No good way to know it
}
final ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment