mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-04-02 12:50:46 +02:00
catch Out Of Memory errors at opening files in the editor
This commit is contained in:
parent
22b331e535
commit
260da456c1
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user