This commit is contained in:
kehaoyuan
2020-07-31 18:19:52 +08:00
parent 0c1e712c79
commit d3f3d2ca98
6 changed files with 210 additions and 58 deletions

View File

@ -670,6 +670,12 @@ public class DownloadManager implements DownloadStatusListener {
downloadEntity.getMeta().put(DownloadEntity.NETWORK_STATUS_KEY, network);
}
if (status == DownloadStatus.add || status == DownloadStatus.subscribe) {
if (downloadEntity.getMeta().get(DownloadDataHelper.DOWNLOAD_FIRST_START) == null) {
downloadEntity.getMeta().put(DownloadDataHelper.DOWNLOAD_FIRST_START, "YES");
}
}
Intent serviceIntent = getIntent(downloadEntity, status);
// 当满足系统版本大于 8.0 并且应用在后台运行时以前台服务开启
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O