Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,12 @@ else if (isExternalStorageDocument(uri)) {
return Environment.getExternalStorageDirectory() + "/" + split[1];
}

// TODO handle non-primary volumes
// Since Android M, the external SD Card used as portable storage shows the
// SDCard ID as DocumentsContract first parameter.
// So docId has the following format: XXXX-XXXX:path/to/the/file
if (type.matches("[A-F0-9]{4}-[A-F0-9]{4}")) {
return "/storage/".concat(type).concat("/").concat(split[1]);
}
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {
Expand Down