Simplify the storage APIs use

* use Java I/O (classic way) on older android versions
* use Storage Access Framework on newer android versions (Android Lollipop or later)
* both changes have the external SD Card write permission
* add option to ask the save path on each download
* warn the user if the save paths are not defined, this only happens on the first NewPipe run (Android Lollipop or later)
This commit is contained in:
kapodamy 2019-04-19 16:18:19 -03:00
parent d9fb7cb420
commit b92b434e2c
9 changed files with 119 additions and 182 deletions

View file

@ -5,14 +5,12 @@
android:title="@string/settings_category_downloads_title">
<ListPreference
<CheckBoxPreference
app:iconSpaceReserved="false"
android:defaultValue="@string/downloads_storage_api_default"
android:entries="@array/downloads_storage_api_description"
android:entryValues="@array/downloads_storage_api_values"
android:key="@string/downloads_storage_api"
android:summary="@string/downloads_storage_desc"
android:title="@string/downloads_storage" />
android:defaultValue="false"
android:key="@string/downloads_storage_ask"
android:summary="@string/downloads_storage_ask_summary_kitkat"
android:title="@string/downloads_storage_ask_title" />
<Preference
app:iconSpaceReserved="false"