mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
catch Out Of Memory errors at opening files in the editor
This commit is contained in:
@ -204,6 +204,9 @@ class ReadTextActivity : SimpleActivity() {
|
||||
} else {
|
||||
try {
|
||||
contentResolver.openInputStream(uri)!!.bufferedReader().use { it.readText() }
|
||||
} catch (e: OutOfMemoryError) {
|
||||
showErrorToast(e.toString())
|
||||
return@ensureBackgroundThread
|
||||
} catch (e: Exception) {
|
||||
showErrorToast(e)
|
||||
finish()
|
||||
|
Reference in New Issue
Block a user