浏览代码

Try to fix job detection

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 年之前
父节点
当前提交
b443737e80
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/owncloud/android/jobs/OfflineSyncJob.java

+ 1 - 1
src/main/java/com/owncloud/android/jobs/OfflineSyncJob.java

@@ -58,7 +58,7 @@ public class OfflineSyncJob extends Job {
         if (!PowerUtils.isPowerSaveMode(context) && !ConnectivityUtils.isInternetWalled(context)) {
             Set<Job> jobs = JobManager.instance().getAllJobsForTag(TAG);
             for (Job job : jobs) {
-                if (!job.isFinished()) {
+                if (!job.isFinished() && !job.equals(this)) {
                     return Result.SUCCESS;
                 }
             }