From df0542b6eff9799fffc22f049dc08f3244a83ca8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 20 Aug 2019 14:45:16 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/lib/theme/ATH.kt | 1 + app/src/main/java/io/legado/app/model/webbook/BookInfo.kt | 4 ++-- .../main/java/io/legado/app/receiver/MediaButtonReceiver.kt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/ATH.kt b/app/src/main/java/io/legado/app/lib/theme/ATH.kt index 512b2ffa7..c5d284064 100644 --- a/app/src/main/java/io/legado/app/lib/theme/ATH.kt +++ b/app/src/main/java/io/legado/app/lib/theme/ATH.kt @@ -100,6 +100,7 @@ object ATH { val color1: Int if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { color1 = ColorUtils.stripAlpha(color) + @Suppress("DEPRECATION") activity.setTaskDescription(ActivityManager.TaskDescription(activity.title as String, null, color1)) } } diff --git a/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt b/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt index 05dfc0fc6..1ad81cf11 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt @@ -37,12 +37,12 @@ object BookInfo { analyzeRule.getString(infoRule.name ?: "")?.let { if (it.isNotEmpty()) book.name = it } - SourceDebug.printLog(bookSource.bookSourceUrl, 1, book.name ?: "") + SourceDebug.printLog(bookSource.bookSourceUrl, 1, book.name) SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取作者") analyzeRule.getString(infoRule.author ?: "")?.let { if (it.isNotEmpty()) book.author = it } - SourceDebug.printLog(bookSource.bookSourceUrl, 1, book.author ?: "") + SourceDebug.printLog(bookSource.bookSourceUrl, 1, book.author) SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取分类") analyzeRule.getString(infoRule.kind ?: "")?.let { if (it.isNotEmpty()) book.kind = it 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 796734c43..d64df95e2 100644 --- a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt +++ b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt @@ -46,7 +46,7 @@ class MediaButtonReceiver : BroadcastReceiver() { } private fun readAloud(context: Context) { - ActivityHelp.getInstance()?.isExist(ReadBookActivity::class.java)?.let { + ActivityHelp.getInstance().isExist(ReadBookActivity::class.java).let { if (!it) { context.startActivity() }