Skip to content

Commit 693abb4

Browse files
authored
Update AudioPreviewActivity.kt
1 parent 1c5b767 commit 693abb4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/src/main/java/org/akanework/gramophone/ui/AudioPreviewActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ class AudioPreviewActivity : BaseActivity(), View.OnClickListener {
355355
val lp = Uri.decode(uri.lastPathSegment)
356356
if (lp?.toUri()?.scheme == "file") { // Let's try our luck! Material Files supports this
357357
fileUri = lp.toUri()
358+
if (!fileUri.toFile().canRead())
359+
fileUri = null // probably .nomedia?
358360
} else { // ¯\_(ツ)_/¯
359361
val pfd = try {
360362
contentResolver.openFileDescriptor(uri, "r")

0 commit comments

Comments
 (0)