pull/32/head
kunfei 5 years ago
parent 6efa706a66
commit df0542b6ef
  1. 1
      app/src/main/java/io/legado/app/lib/theme/ATH.kt
  2. 4
      app/src/main/java/io/legado/app/model/webbook/BookInfo.kt
  3. 2
      app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt

@ -100,6 +100,7 @@ object ATH {
val color1: Int val color1: Int
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
color1 = ColorUtils.stripAlpha(color) color1 = ColorUtils.stripAlpha(color)
@Suppress("DEPRECATION")
activity.setTaskDescription(ActivityManager.TaskDescription(activity.title as String, null, color1)) activity.setTaskDescription(ActivityManager.TaskDescription(activity.title as String, null, color1))
} }
} }

@ -37,12 +37,12 @@ object BookInfo {
analyzeRule.getString(infoRule.name ?: "")?.let { analyzeRule.getString(infoRule.name ?: "")?.let {
if (it.isNotEmpty()) book.name = it 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, "获取作者") SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取作者")
analyzeRule.getString(infoRule.author ?: "")?.let { analyzeRule.getString(infoRule.author ?: "")?.let {
if (it.isNotEmpty()) book.author = it 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, "获取分类") SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取分类")
analyzeRule.getString(infoRule.kind ?: "")?.let { analyzeRule.getString(infoRule.kind ?: "")?.let {
if (it.isNotEmpty()) book.kind = it if (it.isNotEmpty()) book.kind = it

@ -46,7 +46,7 @@ class MediaButtonReceiver : BroadcastReceiver() {
} }
private fun readAloud(context: Context) { private fun readAloud(context: Context) {
ActivityHelp.getInstance()?.isExist(ReadBookActivity::class.java)?.let { ActivityHelp.getInstance().isExist(ReadBookActivity::class.java).let {
if (!it) { if (!it) {
context.startActivity<ReadBookActivity>() context.startActivity<ReadBookActivity>()
} }

Loading…
Cancel
Save