diff --git a/scripts/lint/lint-results.txt b/scripts/lint/lint-results.txt index edc446bfea..2951d7f912 100644 --- a/scripts/lint/lint-results.txt +++ b/scripts/lint/lint-results.txt @@ -1,2 +1,2 @@ DO NOT TOUCH; GENERATED BY DRONE - Lint Report: 1 error and 510 warnings + Lint Report: 510 warnings diff --git a/scripts/lint/lint-up.rb b/scripts/lint/lint-up.rb index 4966555810..5f1f6c40a3 100644 --- a/scripts/lint/lint-up.rb +++ b/scripts/lint/lint-up.rb @@ -117,12 +117,22 @@ else unless previous_error_warning_string.nil? previous_results = true - previous_error_string = previous_error_warning_string.match(/[0-9]* error[s]?/)[0] + previous_error_string = previous_error_warning_string.match(/[0-9]* error[s]?/) + if previous_error_string.nil? + previous_error_string = "0 errors" + else + previous_error_string = previous_error_string[0] + end previous_error_count = previous_error_string.match(/[0-9]*/)[0].to_i puts "previous errors: " + previous_error_count.to_s if CHECK_WARNINGS == true - previous_warning_string = previous_error_warning_string.match(/[0-9]* warning[s]?/)[0] + previous_warning_string = previous_error_warning_string.match(/[0-9]* warning[s]?/) + if previous_warning_string.nil? + previous_warning_string = "0 warnings" + else + previous_warning_string = previous_warning_string[0] + end previous_warning_count = previous_warning_string.match(/[0-9]*/)[0].to_i puts "previous warnings: " + previous_warning_count.to_s end diff --git a/src/main/java/com/owncloud/android/utils/ReceiversHelper.java b/src/main/java/com/owncloud/android/utils/ReceiversHelper.java index 6ee7950646..35fd472c65 100644 --- a/src/main/java/com/owncloud/android/utils/ReceiversHelper.java +++ b/src/main/java/com/owncloud/android/utils/ReceiversHelper.java @@ -44,7 +44,7 @@ public class ReceiversHelper { BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { - if (Device.getNetworkType(context).equals(JobRequest.NetworkType.UNMETERED)) { + if (!Device.getNetworkType(context).equals(JobRequest.NetworkType.ANY)) { FilesSyncHelper.restartJobsIfNeeded(); } }