fix: Release 包中部分页面预加载失败
This commit is contained in:
parent
1e99d0fe21
commit
3f1bd7b9b7
|
|
@ -267,13 +267,20 @@
|
||||||
-keep,allowobfuscation,allowshrinking class com.huanchengfly.tieba.post.api.retrofit.ApiResult
|
-keep,allowobfuscation,allowshrinking class com.huanchengfly.tieba.post.api.retrofit.ApiResult
|
||||||
-keep,allowobfuscation,allowshrinking class * extends com.huanchengfly.tieba.post.api.retrofit.ApiResult
|
-keep,allowobfuscation,allowshrinking class * extends com.huanchengfly.tieba.post.api.retrofit.ApiResult
|
||||||
|
|
||||||
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
|
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
|
||||||
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
-keep,allowobfuscation,allowshrinking class retrofit2.Response
|
||||||
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
|
||||||
|
|
||||||
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
|
||||||
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
|
||||||
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
|
||||||
|
|
||||||
|
-keep,allowobfuscation,allowshrinking class com.billy.android.preloader.** { *; }
|
||||||
|
-keep,allowobfuscation,allowshrinking class com.huanchengfly.tieba.post.utils.preload.** { *; }
|
||||||
|
|
||||||
-if interface * { @retrofit2.http.* <methods>; }
|
-if interface * { @retrofit2.http.* <methods>; }
|
||||||
-keep,allowobfuscation interface <1>
|
-keep,allowobfuscation interface <1>
|
||||||
|
|
||||||
|
-keepclassmembers,allowobfuscation class * {
|
||||||
|
@com.google.gson.annotations.SerializedName <fields>;
|
||||||
|
}
|
||||||
|
|
@ -104,7 +104,7 @@ object ImageCacheUtil {
|
||||||
private fun getFolderSize(file: File): Long {
|
private fun getFolderSize(file: File): Long {
|
||||||
var size: Long = 0
|
var size: Long = 0
|
||||||
try {
|
try {
|
||||||
val fileList = file.listFiles()
|
val fileList = file.listFiles() ?: return 0
|
||||||
for (aFileList in fileList) {
|
for (aFileList in fileList) {
|
||||||
size = if (aFileList.isDirectory) {
|
size = if (aFileList.isDirectory) {
|
||||||
size + getFolderSize(aFileList)
|
size + getFolderSize(aFileList)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import com.billy.android.preloader.interfaces.DataLoader;
|
||||||
public final class PreloadUtil {
|
public final class PreloadUtil {
|
||||||
public static final String EXTRA_PRELOAD_ID = "preload_id";
|
public static final String EXTRA_PRELOAD_ID = "preload_id";
|
||||||
|
|
||||||
public static void startActivityWithPreload(Context context, Intent intent, DataLoader dataLoader) {
|
public static void startActivityWithPreload(Context context, Intent intent, DataLoader<?> dataLoader) {
|
||||||
context.startActivity(intent.putExtra(EXTRA_PRELOAD_ID, PreLoader.preLoad(dataLoader)));
|
context.startActivity(intent.putExtra(EXTRA_PRELOAD_ID, PreLoader.preLoad(dataLoader)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".fragments.PhotoViewFragment">
|
tools:context=".fragments.PhotoViewFragment">
|
||||||
<com.github.panpf.sketch.zoom.SketchZoomImageView
|
<com.github.panpf.zoomimage.SketchZoomImageView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue