pull/34/head
kunfei 5 years ago
parent db02b4a224
commit a326b20cb3
  1. 2
      app/src/main/java/io/legado/app/service/BaseReadAloudService.kt
  2. 1
      app/src/main/java/io/legado/app/service/TTSReadAloudService.kt

@ -219,7 +219,7 @@ abstract class BaseReadAloudService : BaseService(),
* 初始化MediaSession, 注册多媒体按钮
*/
private fun initMediaSession() {
mediaSessionCompat = MediaSessionCompat(this, TTSReadAloudService.tag)
mediaSessionCompat = MediaSessionCompat(this, "readAloud")
mediaSessionCompat?.setCallback(object : MediaSessionCompat.Callback() {
override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
return MediaButtonReceiver.handleIntent(this@BaseReadAloudService, mediaButtonEvent)

@ -19,7 +19,6 @@ import java.util.*
class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener {
companion object {
val tag: String = TTSReadAloudService::class.java.simpleName
var textToSpeech: TextToSpeech? = null
fun clearTTS() {

Loading…
Cancel
Save