From 25ac4d53111b6c9eb30cdfe590c15f286c77eec1 Mon Sep 17 00:00:00 2001 From: ag2s20150909 Date: Fri, 27 Aug 2021 14:37:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgoogle=E7=89=88=E5=9C=A8?= =?UTF-8?q?=E6=B2=A1gms=E7=9A=84=E6=89=8B=E6=9C=BA=E4=B8=8A=E5=BC=80?= =?UTF-8?q?=E5=90=AFcronet=E6=97=B6=E9=97=AA=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/help/http/cronet/CronetLoader.kt | 3 ++- app/src/main/java/io/legado/app/model/localBook/UmdFile.kt | 2 +- .../app/ui/main/bookshelf/style2/BooksAdapterGrid.kt | 7 ++++++- .../app/ui/main/bookshelf/style2/BooksAdapterList.kt | 6 +++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt index ad9258c5e..c2c03fefa 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt @@ -50,7 +50,8 @@ object CronetLoader : CronetEngine.Builder.LibraryLoader() { fun install(): Boolean { if (AppConfig.isGooglePlay) { - return true + //检查GMS的Cronet服务是否安装 + return CronetProviderInstaller.isInstalled() } if (md5.length != 32 || !soFile.exists() || md5 != getFileMD5(soFile)) { return false diff --git a/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt b/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt index cb6b83ad1..0a40f9756 100644 --- a/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/UmdFile.kt @@ -129,7 +129,7 @@ class UmdFile(var book: Book) { return chapterList } - private fun getImage(href: String): InputStream? { + private fun getImage(@Suppress("UNUSED_PARAMETER") href: String): InputStream? { return null } diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt index 2ffe196ce..aec465be4 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt @@ -52,7 +52,12 @@ class BooksAdapterGrid(context: Context, callBack: CallBack) : } } - private fun onBindGroup(binding: ItemBookshelfGridGroupBinding, position: Int, bundle: Bundle) { + + private fun onBindGroup( + binding: ItemBookshelfGridGroupBinding, + position: Int, + @Suppress("UNUSED_PARAMETER") bundle: Bundle + ) { binding.run { val item = callBack.getItem(position) as BookGroup tvName.text = item.groupName diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt index 371628ae6..98c0cd6be 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt @@ -51,7 +51,11 @@ class BooksAdapterList(context: Context, callBack: CallBack) : } } - private fun onBindGroup(binding: ItemBookshelfListGroupBinding, position: Int, bundle: Bundle) { + private fun onBindGroup( + binding: ItemBookshelfListGroupBinding, + position: Int, + @Suppress("UNUSED_PARAMETER") bundle: Bundle + ) { binding.run { val item = callBack.getItem(position) as BookGroup tvName.text = item.groupName