mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-11 01:40:59 +00:00
patch for ListHelper.java
double check for null
This commit is contained in:
parent
bb0d8ad58a
commit
4ef8b93344
@ -443,11 +443,11 @@ public final class ListHelper {
|
||||
/**
|
||||
* Are we connected to wifi?
|
||||
* @param context App context
|
||||
* @return True if connected to wifi
|
||||
* @return {@code true} if connected to wifi
|
||||
*/
|
||||
private static boolean isWifiActive(Context context)
|
||||
{
|
||||
ConnectivityManager manager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
return manager.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI;
|
||||
return manager != null && manager.getActiveNetworkInfo() != null && manager.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user