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 c1b9098d78
commit 5d34ec2cd4
6 changed files with 66 additions and 69 deletions

View file

@ -251,6 +251,7 @@ public class StoredFileHelper implements Serializable {
public boolean existsAsFile() {
if (source == null) return false;
// WARNING: DocumentFile.exists() and DocumentFile.isFile() methods are slow
boolean exists = docFile == null ? ioFile.exists() : docFile.exists();
boolean isFile = docFile == null ? ioFile.isFile() : docFile.isFile();// ¿docFile.isVirtual() means is no-physical?