Skip to content

Commit

Permalink
fix: remove checks for non-tree content Uris
Browse files Browse the repository at this point in the history
  • Loading branch information
jd1378 committed Oct 14, 2022
1 parent b6854e1 commit 0e053ea
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,7 @@ public DocumentFile goToDocument(
// It's a document picked by user
DocumentFile doc = DocumentFile.fromSingleUri(context, Uri.parse(unknownUriString));
if (doc != null) {
if (!doc.canRead()) {
throw new SecurityException(
"You don't have read permission to access uri: " + unknownUriString);
}
if (doc.isFile() && doc.exists()) {
return doc;
}
return doc;
}
throw new FileNotFoundException(
"Cannot find the given document. File does not exist at '" + unknownUriString + "'");
Expand Down

0 comments on commit 0e053ea

Please sign in to comment.