feat: 优化代码

pull/238/head
gedoor 5 years ago
parent 027e74ddea
commit ae5011de7b
  1. 4
      app/src/main/java/io/legado/app/service/HttpReadAloudService.kt

@ -76,7 +76,9 @@ class HttpReadAloudService : BaseReadAloudService(),
val file = getSpeakFile(index)
file.writeBytes(bytes)
if (index == nowSpeak) {
playAudio(FileInputStream(file).fd)
@Suppress("BlockingMethodInNonBlockingContext")
val fis = FileInputStream(file)
playAudio(fis.fd)
}
}
} else {

Loading…
Cancel
Save