|
|
|
@ -1,5 +1,6 @@ |
|
|
|
|
package io.legado.app.service |
|
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint |
|
|
|
|
import android.app.PendingIntent |
|
|
|
|
import android.content.BroadcastReceiver |
|
|
|
|
import android.content.Context |
|
|
|
@ -225,6 +226,7 @@ abstract class BaseReadAloudService : BaseService(), |
|
|
|
|
/** |
|
|
|
|
* 初始化MediaSession, 注册多媒体按钮 |
|
|
|
|
*/ |
|
|
|
|
@SuppressLint("UnspecifiedImmutableFlag") |
|
|
|
|
private fun initMediaSession() { |
|
|
|
|
mediaSessionCompat.setCallback(object : MediaSessionCompat.Callback() { |
|
|
|
|
override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean { |
|
|
|
|