From 993f7fb7f09a565c5f5b4dbee00f2ae8af0a26f7 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 25 Aug 2019 21:25:18 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/receiver/MediaButtonReceiver.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt index cec51bea0..ec23e0265 100644 --- a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt +++ b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt @@ -8,7 +8,6 @@ import io.legado.app.constant.Bus import io.legado.app.help.ActivityHelp import io.legado.app.ui.readbook.ReadBookActivity import io.legado.app.utils.postEvent -import org.jetbrains.anko.startActivity /** @@ -48,7 +47,9 @@ class MediaButtonReceiver : BroadcastReceiver() { private fun readAloud(context: Context) { ActivityHelp.isExist(ReadBookActivity::class.java).let { if (!it) { - context.startActivity() + val intent = Intent(context, ReadBookActivity::class.java) + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + context.startActivity(intent) } } postEvent(Bus.READ_ALOUD, true)