We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d36246d commit e24a41dCopy full SHA for e24a41d
app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt
@@ -561,7 +561,12 @@ class MainActivity : SimpleActivity() {
561
}
562
563
private fun checkUri(uri: Uri, onChecksPassed: () -> Unit) {
564
- val inputStream = contentResolver.openInputStream(uri) ?: return
+ val inputStream = try {
565
+ contentResolver.openInputStream(uri) ?: return
566
+ } catch (e: Exception) {
567
+ return
568
+ }
569
+
570
if (inputStream.available() > 1000 * 1000) {
571
toast(R.string.file_too_large)
572
} else {
0 commit comments