From 7816e923fc885915b8e3a1c5853828630e4eae0f Mon Sep 17 00:00:00 2001 From: Xwite <82232510+Xwite@users.noreply.github.com> Date: Mon, 17 Oct 2022 13:59:24 +0800 Subject: [PATCH 1/4] Update proguard-rules.pro --- app/proguard-rules.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 119452b38..064b2892e 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -234,8 +234,7 @@ ## 保证该私有变量不被混淆 -keepclassmembers class com.google.android.exoplayer2.upstream.cache.CacheDataSource$Factory { - #noinspection ShrinkerUnresolvedReference - private DataSource.Factory upstreamDataSourceFactory; + upstreamDataSourceFactory; } ## 对外提供api From 68ab0909f1800a277bb3a07318813e8106c73a0b Mon Sep 17 00:00:00 2001 From: Xwite <82232510+Xwite@users.noreply.github.com> Date: Mon, 17 Oct 2022 14:02:53 +0800 Subject: [PATCH 2/4] Update build.gradle --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 17cc1dbc0..465f241f8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -71,8 +71,8 @@ android { applicationIdSuffix '.release' //混淆还是有点问题, exoplayer的库出问题了 - minifyEnabled false - //shrinkResources true + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { From 3c40bddbc86b8d5300d152882fdbe20184975884 Mon Sep 17 00:00:00 2001 From: Xwite <82232510+Xwite@users.noreply.github.com> Date: Mon, 17 Oct 2022 14:18:33 +0800 Subject: [PATCH 3/4] Update proguard-rules.pro --- app/proguard-rules.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 064b2892e..7dd9cb948 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -234,7 +234,7 @@ ## 保证该私有变量不被混淆 -keepclassmembers class com.google.android.exoplayer2.upstream.cache.CacheDataSource$Factory { - upstreamDataSourceFactory; + *** upstreamDataSourceFactory; } ## 对外提供api From 8707fbadb966aa6c2a400fa3dbab99e952aa3113 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Mon, 17 Oct 2022 15:28:07 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=89=BE=E5=88=B0=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E4=B9=A6=E7=B1=8D=E8=B7=AF=E5=BE=84=E5=90=8E=E6=9B=B4=E6=96=B0?= =?UTF-8?q?bookUrl=20=E4=B8=8B=E6=AC=A1=E9=87=8D=E5=90=AF=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E5=86=8D=E6=89=BE=E4=B8=80=E9=81=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/book/BookExtensions.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/io/legado/app/help/book/BookExtensions.kt b/app/src/main/java/io/legado/app/help/book/BookExtensions.kt index 51f0a9587..45c441521 100644 --- a/app/src/main/java/io/legado/app/help/book/BookExtensions.kt +++ b/app/src/main/java/io/legado/app/help/book/BookExtensions.kt @@ -93,6 +93,9 @@ fun Book.getLocalUri(): Uri { val fileDoc = treeFileDoc.find(originName, 3) if (fileDoc != null) { localUriCache[bookUrl] = fileDoc.uri + //更新bookUrl 重启不用再找一遍 + bookUrl = fileDoc.toString() + save() return fileDoc.uri } localUriCache[bookUrl] = uri