|
|
|
@ -64,7 +64,9 @@ class CheckSourceService : BaseService() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun check() { |
|
|
|
|
processIndex++ |
|
|
|
|
synchronized(this) { |
|
|
|
|
processIndex++ |
|
|
|
|
} |
|
|
|
|
if (processIndex < allIds.size) { |
|
|
|
|
val sourceUrl = allIds[processIndex] |
|
|
|
|
|
|
|
|
@ -81,8 +83,10 @@ class CheckSourceService : BaseService() { |
|
|
|
|
checkedIds.size, |
|
|
|
|
getString(R.string.progress_show, checkedIds.size, allIds.size) |
|
|
|
|
) |
|
|
|
|
if (processIndex >= allIds.size + threadCount - 1) { |
|
|
|
|
stopSelf() |
|
|
|
|
synchronized(this) { |
|
|
|
|
if (processIndex >= allIds.size + threadCount - 1) { |
|
|
|
|
stopSelf() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|