pull/34/head
kunfei 5 years ago
parent 9b3ae994bd
commit d85db50d03
  1. 13
      app/src/main/java/io/legado/app/help/ReadAloud.kt

@ -2,12 +2,23 @@ package io.legado.app.help
import android.content.Context
import android.content.Intent
import io.legado.app.App
import io.legado.app.constant.Action
import io.legado.app.service.BaseReadAloudService
import io.legado.app.service.HttpReadAloudService
import io.legado.app.service.TTSReadAloudService
import io.legado.app.utils.getPrefBoolean
object ReadAloud {
var aloudClass = TTSReadAloudService::class.java
var aloudClass: Class<*> = getReadAloudClass()
fun getReadAloudClass(): Class<*> {
return if (App.INSTANCE.getPrefBoolean("tts", true)) {
TTSReadAloudService::class.java
} else {
HttpReadAloudService::class.java
}
}
fun play(
context: Context,

Loading…
Cancel
Save