joinToString before releasing RootSession

This commit is contained in:
Mygod
2018-10-08 13:27:08 +08:00
parent 54ed6eab42
commit d06ec3e4f7

View File

@@ -94,8 +94,8 @@ class SettingsPreferenceFragment : PreferenceFragmentCompat() {
|logcat -d
""".trimMargin())
try {
out.write(RootSession.use { it.execQuiet(commands.toString(), true).out }
.joinToString("\n").toByteArray())
out.write(RootSession.use { it.execQuiet(commands.toString(), true).out.joinToString("\n") }
.toByteArray())
} catch (e: Exception) {
e.printStackTrace(writer)
writer.flush()