Fix download finished
This commit is contained in:
1 parent
4a4c447bd2
commit
2234d056fc
1 file changed
+3
-3
@@ -242,7 +242,7 @@ public final class SpiderQueen implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private void notifyFinish() {
|
||||
private void notifyAllPageDownloaded() {
|
||||
int size = -1;
|
||||
int[] temp = mPageStateArray;
|
||||
if (temp != null) {
|
||||
@@ -715,8 +715,6 @@ public final class SpiderQueen implements Runnable {
|
||||
// Set mQueenThread null
|
||||
mQueenThread = null;
|
||||
|
||||
notifyFinish();
|
||||
|
||||
if (DEBUG_LOG) {
|
||||
Log.i(TAG, Thread.currentThread().getName() + ": end");
|
||||
}
|
||||
@@ -769,6 +767,8 @@ public final class SpiderQueen implements Runnable {
|
||||
} else if (state == STATE_FINISHED) {
|
||||
notifyPageSuccess(index);
|
||||
}
|
||||
|
||||
if (mFinishedPages.get() == size()) notifyAllPageDownloaded();
|
||||
}
|
||||
|
||||
@IntDef({MODE_READ, MODE_DOWNLOAD})
|
||||
|
||||
Reference in new issue
Block a user