[Android] Fix download subtitle on external card
Nicolas Pomepuy
git at videolan.org
Wed Oct 21 09:02:40 CEST 2020
vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Oct 7 11:47:53 2020 +0200| [bc3c8bb62a6fc154f075d716490a1f669a5e7f99] | committer: Nicolas Pomepuy
Fix download subtitle on external card
Fixes #1478
(cherry picked from commit 84a019cc34170244001dd9af236a2f53b3bbf5b0)
> https://code.videolan.org/videolan/vlc-android/commit/bc3c8bb62a6fc154f075d716490a1f669a5e7f99
---
.../src/org/videolan/vlc/gui/helpers/hf/WriteExternalDelegate.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/WriteExternalDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/WriteExternalDelegate.kt
index 35cd9d2995..787b019001 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/WriteExternalDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/hf/WriteExternalDelegate.kt
@@ -104,7 +104,7 @@ class WriteExternalDelegate : BaseHeadlessFragment() {
fun needsWritePermission(uri: Uri) : Boolean {
val path = uri.path ?: return false
- return AndroidUtil.isLolliPopOrLater && "file" == uri.scheme
+ return AndroidUtil.isLolliPopOrLater && ("file" == uri.scheme || uri.scheme == null)
&& path.isNotEmpty() && path.startsWith('/')
&& !path.startsWith(AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY)
&& !(FileUtils.findFile(uri)?.canWrite() ?: false)
More information about the Android
mailing list