pull/34/head
kunfei 5 years ago
parent de822857d7
commit d06532c8cb
  1. 2
      app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt

@ -22,7 +22,7 @@ class MediaButtonReceiver : BroadcastReceiver() {
fun handleIntent(context: Context, intent: Intent): Boolean { fun handleIntent(context: Context, intent: Intent): Boolean {
val intentAction = intent.action val intentAction = intent.action
LogUtils.log("耳机按键:$intentAction") LogUtils.log("耳机按键: $intentAction")
if (Intent.ACTION_MEDIA_BUTTON == intentAction) { if (Intent.ACTION_MEDIA_BUTTON == intentAction) {
val event = val event =
intent.getParcelableExtra<KeyEvent>(Intent.EXTRA_KEY_EVENT) ?: return false intent.getParcelableExtra<KeyEvent>(Intent.EXTRA_KEY_EVENT) ?: return false

Loading…
Cancel
Save