Changes for Android 9 (Pie)

* validate the stored file before start the mission
* add warning on StoredFileHelper.java
* simplify the communication between MissionAdapter and DownloadManagerService.java since shares the same looper
* simplify setVisible() "start/pause all downloads" buttons logic
This commit is contained in:
kapodamy 2019-09-01 18:17:54 -03:00
parent 85d1888ba7
commit 1a643126de
6 changed files with 66 additions and 69 deletions

View file

@ -424,10 +424,12 @@ public class DownloadManager {
boolean flag = false;
for (DownloadMission mission : mMissionsPending) {
if (mission.running || !mission.enqueued || mission.isFinished() || mission.hasInvalidStorage())
if (mission.running || !mission.enqueued || mission.isFinished())
continue;
resumeMission(mission);
if (mission.errCode != DownloadMission.ERROR_NOTHING) continue;
if (mPrefQueueLimit) return true;
flag = true;
}