check for Storage Access Framework features

* creating files though saf
* picking folder though saf
This commit is contained in:
kapodamy 2019-08-14 15:30:34 -03:00
parent 80b9f3bdbc
commit 21b88f7320
3 changed files with 56 additions and 17 deletions

View file

@ -569,7 +569,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
// This part is called if with SAF preferred:
// * older android version running
// * save path not defined (via download settings)
// * the user as checked the "ask where to download" option
// * the user checked the "ask where to download" option
if (!askForSavePath)
Toast.makeText(context, getString(R.string.no_available_dir), Toast.LENGTH_LONG).show();
@ -728,7 +728,7 @@ public class DownloadDialog extends DialogFragment implements RadioGroup.OnCheck
try {
if (storage.length() > 0) storage.truncate();
} catch (IOException e) {
Log.e(TAG, "failed to overwrite the file: " + storage.getUri().toString(), e);
Log.e(TAG, "failed to truncate the file: " + storage.getUri().toString(), e);
showFailedDialog(R.string.overwrite_failed);
return;
}