When automatically updating feeds, check if a network connection is available first

This commit is contained in:
Martin Fietz 2017-05-31 17:36:55 +02:00 committed by H. Lehmann
parent 48edae7db6
commit dc6141ea1d
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ public class FeedUpdateReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "Received intent");
ClientConfig.initialize(context);
if (NetworkUtils.isDownloadAllowed()) {
if (NetworkUtils.networkAvailable() && NetworkUtils.isDownloadAllowed()) {
DBTasks.refreshAllFeeds(context, null);
} else {
Log.d(TAG, "Blocking automatic update: no wifi available / no mobile updates allowed");