Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}

allprojects {
repositories {
jcenter()
google()
jcenter()
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ public void notifyConnected(MessageSnapshot snapshot) {

@Override
public void notifyProgress(MessageSnapshot snapshot) {
if (mTask == null) {
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(this, "can't notify progress snapshot(id[%d], status[%d])",
snapshot.getId(), snapshot.getStatus());
}
return;
}
final BaseDownloadTask originTask = mTask.getOrigin();
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(this, "notify progress %s %d %d",
Expand Down Expand Up @@ -139,6 +146,13 @@ public void notifyBlockComplete(MessageSnapshot snapshot) {

@Override
public void notifyRetry(MessageSnapshot snapshot) {
if (mTask == null) {
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(this, "can't notify retry snapshot(id[%d], status[%d])",
snapshot.getId(), snapshot.getStatus());
}
return;
}
if (FileDownloadLog.NEED_LOG) {
final BaseDownloadTask originTask = mTask.getOrigin();
FileDownloadLog.d(this, "notify retry %s %d %d %s", mTask,
Expand All @@ -165,6 +179,13 @@ public void notifyWarn(MessageSnapshot snapshot) {

@Override
public void notifyError(MessageSnapshot snapshot) {
if (mTask == null) {
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(this, "can't notify error snapshot(id[%d], status[%d])",
snapshot.getId(), snapshot.getStatus());
}
return;
}
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(this, "notify error %s %s", mTask, mTask.getOrigin().getErrorCause());
}
Expand Down