add manual switch in download setting fragment
switch for: * Java I/O Api * Storage Access Framework
This commit is contained in:
parent
5d46a369a6
commit
fa0dbaf953
10 changed files with 73 additions and 69 deletions
|
|
@ -329,7 +329,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
|
|||
return;
|
||||
}
|
||||
|
||||
if (data.getData().getAuthority() != null && data.getData().getAuthority().startsWith(context.getPackageName())) {
|
||||
if (FilePickerActivityHelper.isOwnFileUri(context, data.getData())) {
|
||||
File file = Utils.getFileForUri(data.getData());
|
||||
checkSelectedDownload(null, Uri.fromFile(file), file.getName(), StoredFileHelper.DEFAULT_MIME);
|
||||
return;
|
||||
|
|
@ -592,7 +592,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
|
|||
if (!askForSavePath)
|
||||
Toast.makeText(context, getString(R.string.no_available_dir), Toast.LENGTH_LONG).show();
|
||||
|
||||
if (NewPipeSettings.hasCreateDocumentSupport) {
|
||||
if (NewPipeSettings.useStorageAccessFramework(context)) {
|
||||
StoredFileHelper.requestSafWithFileCreation(this, REQUEST_DOWNLOAD_SAVE_AS, filename, mime);
|
||||
} else {
|
||||
File initialSavePath;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue