Merge pull request #1578 from nextcloud/fix-4g-retry

Fix 4g retry
This commit is contained in:
Tobias Kaminsky 2017-09-23 09:35:18 +02:00 committed by GitHub
commit 2dde6e7b61
3 changed files with 14 additions and 4 deletions

View file

@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 1 error and 510 warnings</span>
<span class="mdl-layout-title">Lint Report: 510 warnings</span>

View file

@ -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

View file

@ -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();
}
}