pull/37/head
kunfei 5 years ago
parent 80fa33c6df
commit fecb37c2b2
  1. 2
      app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt

@ -7,7 +7,6 @@ import android.view.KeyEvent
import io.legado.app.constant.Bus
import io.legado.app.help.ActivityHelp
import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.utils.LogUtils
import io.legado.app.utils.postEvent
@ -23,7 +22,6 @@ class MediaButtonReceiver : BroadcastReceiver() {
fun handleIntent(context: Context, intent: Intent): Boolean {
val intentAction = intent.action
val keyEventAction = intent.getParcelableExtra<KeyEvent>(Intent.EXTRA_KEY_EVENT)?.action
LogUtils.d("耳机按键", "$intentAction $keyEventAction")
if (Intent.ACTION_MEDIA_BUTTON == intentAction) {
if (keyEventAction == KeyEvent.ACTION_DOWN) {
readAloud(context)

Loading…
Cancel
Save