|
|
@ -69,10 +69,10 @@ class MediaButtonReceiver : BroadcastReceiver() { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
AudioPlay.pause(context) |
|
|
|
AudioPlay.pause(context) |
|
|
|
} |
|
|
|
} |
|
|
|
ActivityHelp.isExist(AudioPlayActivity::class.java) -> |
|
|
|
|
|
|
|
postEvent(EventBus.MEDIA_BUTTON, true) |
|
|
|
|
|
|
|
ActivityHelp.isExist(ReadBookActivity::class.java) -> |
|
|
|
ActivityHelp.isExist(ReadBookActivity::class.java) -> |
|
|
|
postEvent(EventBus.MEDIA_BUTTON, true) |
|
|
|
postEvent(EventBus.MEDIA_BUTTON, true) |
|
|
|
|
|
|
|
ActivityHelp.isExist(AudioPlayActivity::class.java) -> |
|
|
|
|
|
|
|
postEvent(EventBus.MEDIA_BUTTON, true) |
|
|
|
else -> if (context.getPrefBoolean("mediaButtonOnExit", true)) { |
|
|
|
else -> if (context.getPrefBoolean("mediaButtonOnExit", true)) { |
|
|
|
GlobalScope.launch(Main) { |
|
|
|
GlobalScope.launch(Main) { |
|
|
|
val lastBook: Book? = withContext(IO) { |
|
|
|
val lastBook: Book? = withContext(IO) { |
|
|
|