Implement Storage Access Framework

* re-work finished mission database
* re-work DownloadMission and bump it Serializable version
* keep the classic Java IO API
* SAF Tree API support on Android Lollipop or higher
* add wrapper for SAF stream opening
* implement Closeable in SharpStream to replace the dispose() method

* do required changes for this API:
** remove any file creation logic from DownloadInitializer
** make PostProcessing Serializable and reduce the number of iterations
** update all strings.xml files
** storage helpers: StoredDirectoryHelper & StoredFileHelper
** best effort to handle any kind of SAF errors/exceptions
This commit is contained in:
kapodamy 2019-04-05 14:45:39 -03:00
parent 8d8059229f
commit 7ca7952790
62 changed files with 2439 additions and 1180 deletions

View file

@ -442,12 +442,12 @@
<string name="permission_denied">Действие запрещено системой</string>
<string name="download_failed">Ошибка загрузки</string>
<string name="overwrite">Перезаписать</string>
<string name="overwrite_warning">Файл с таким именем уже существует</string>
<string name="overwrite_finished_warning">Файл с таким именем уже существует</string>
<string name="download_already_running">Загрузка с таким именем уже выполняется</string>
<string name="show_error">Показать текст ошибки</string>
<string name="label_code">Код</string>
<string name="error_path_creation">Файл не может быть создан</string>
<string name="error_file_creation">Папка назначения не может быть создана</string>
<string name="error_path_creation">Папка назначения не может быть создана</string>
<string name="error_file_creation">Файл не может быть создан</string>
<string name="error_permission_denied">Доступ запрещен системой</string>
<string name="error_unknown_host">Сервер не найден</string>
<string name="error_http_unsupported_range">"Сервер не поддерживает многопотоковую загрузку, попробуйте с @string/msg_threads = 1"</string>