mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-24 04:20:07 +01:00
adding a crashfix
This commit is contained in:
parent
d36246d445
commit
e24a41d51d
@ -561,7 +561,12 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun checkUri(uri: Uri, onChecksPassed: () -> Unit) {
|
||||
val inputStream = contentResolver.openInputStream(uri) ?: return
|
||||
val inputStream = try {
|
||||
contentResolver.openInputStream(uri) ?: return
|
||||
} catch (e: Exception) {
|
||||
return
|
||||
}
|
||||
|
||||
if (inputStream.available() > 1000 * 1000) {
|
||||
toast(R.string.file_too_large)
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user