From a326b20cb3b502e4ee4c0bb817f461012dcbc02a Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 19 Sep 2019 11:16:57 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/service/BaseReadAloudService.kt | 2 +- app/src/main/java/io/legado/app/service/TTSReadAloudService.kt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt b/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt index 19c29dbe3..9af47f861 100644 --- a/app/src/main/java/io/legado/app/service/BaseReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/BaseReadAloudService.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) diff --git a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt index b8cbdedfc..e3fc37479 100644 --- a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt @@ -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() {