添加链接为空的情况处理
This commit is contained in:
@ -56,6 +56,12 @@ public class DownloadThread extends Thread {
|
||||
fileOutputStream = new FileOutputStream(entry.getPath());
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(entry.getUrl())) {
|
||||
listener.onStatusChanged(DownloadStatus.notfound);
|
||||
Utils.log(DownloadThread.class.getSimpleName(),
|
||||
"error-->url is empty");
|
||||
return;
|
||||
}
|
||||
URL url = new URL(entry.getUrl());
|
||||
Utils.log("url = " + entry.getUrl());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user