Skip to content
Open
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 @@ -267,6 +267,8 @@ class ShareProofActivity : AppCompatActivity() {
generateProof(mediaUri, proofHash, mimeType!!)
} catch (fe: FileNotFoundException) {
proofHash = null
} catch (se: SecurityException) {
proofHash = null
}
}
}
Expand Down Expand Up @@ -1175,6 +1177,8 @@ class ShareProofActivity : AppCompatActivity() {
)
} catch (fe: FileNotFoundException) {
Timber.d("FileNotFound: %s", mediaUri)
} catch (se: SecurityException) {
Timber.d("no access to media URI: %s", mediaUri)
}
}

Expand All @@ -1196,6 +1200,13 @@ class ShareProofActivity : AppCompatActivity() {
} catch (e: FileNotFoundException) {
Timber.w(e)
null
} catch (e: SecurityException) {
// The URI's read grant can be gone by the time we get here (e.g. a
// MediaStore URI shared from another app whose temporary permission
// already expired). Treat it the same as "no proof yet" instead of
// crashing the share screen.
Timber.w(e, "no access to media URI: %s", mediaUri)
null
}
}

Expand Down