pull/47/head
kunfei 5 years ago
parent 132362f0e1
commit 68a5889ff2
  1. 2
      app/src/main/java/io/legado/app/service/AudioPlayService.kt

@ -24,6 +24,7 @@ import io.legado.app.help.IntentHelp
import io.legado.app.help.MediaHelp import io.legado.app.help.MediaHelp
import io.legado.app.receiver.MediaButtonReceiver import io.legado.app.receiver.MediaButtonReceiver
import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.book.read.ReadBookActivity
import io.legado.app.utils.LogUtils
import io.legado.app.utils.postEvent import io.legado.app.utils.postEvent
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import org.jetbrains.anko.toast import org.jetbrains.anko.toast
@ -107,6 +108,7 @@ class AudioPlayService : BaseService(),
mediaPlayer.setDataSource(url) mediaPlayer.setDataSource(url)
mediaPlayer.prepareAsync() mediaPlayer.prepareAsync()
} catch (e: Exception) { } catch (e: Exception) {
LogUtils.d("AudioPlayService", e.localizedMessage + " " + url)
launch { launch {
toast(e.localizedMessage + " " + url) toast(e.localizedMessage + " " + url)
stopSelf() stopSelf()

Loading…
Cancel
Save