Skip to content

Commit

Permalink
remove call to content provider for file
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyofrancis committed Aug 17, 2020
1 parent 7291ce8 commit 65421a5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fun deleteFile(filePath: String, context: Context): Boolean {
when {
uri.scheme == "file" -> {
val file = File(uri.path)
if (file.canWrite() && file.exists()) deleteFile(file) else context.contentResolver.delete(uri, null, null) > 0
if (file.canWrite() && file.exists()) deleteFile(file) else false
}
uri.scheme == "content" -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT
Expand Down

0 comments on commit 65421a5

Please sign in to comment.