mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Guard synchronizedList's iteration
It's needed to guard a synchronizedList when iterating it
This commit is contained in:
parent
18de60f68c
commit
5a88984d34
@ -103,9 +103,11 @@ class FlashViewModel : BaseViewModel() {
|
|||||||
val name = "magisk_install_log_%s.log".format(now.toTime(timeFormatStandard))
|
val name = "magisk_install_log_%s.log".format(now.toTime(timeFormatStandard))
|
||||||
val file = MediaStoreUtils.getFile(name, true)
|
val file = MediaStoreUtils.getFile(name, true)
|
||||||
file.uri.outputStream().bufferedWriter().use { writer ->
|
file.uri.outputStream().bufferedWriter().use { writer ->
|
||||||
logItems.forEach {
|
synchronized(logItems) {
|
||||||
writer.write(it)
|
logItems.forEach {
|
||||||
writer.newLine()
|
writer.write(it)
|
||||||
|
writer.newLine()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SnackbarEvent(file.toString()).publish()
|
SnackbarEvent(file.toString()).publish()
|
||||||
|
Loading…
Reference in New Issue
Block a user