修复图片转pdf的正式版bug
This commit is contained in:
parent
5bd33845e1
commit
3ad4c5e916
@ -40,7 +40,6 @@ android {
|
|||||||
versionName = "1.0.6"
|
versionName = "1.0.6"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
setProperty("archivesBaseName", "${getAppNameFromStringsFile()}-$versionName($versionCode)-${timestamp}")
|
setProperty("archivesBaseName", "${getAppNameFromStringsFile()}-$versionName($versionCode)-${timestamp}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
18
app/proguard-rules.pro
vendored
18
app/proguard-rules.pro
vendored
@ -32,13 +32,6 @@
|
|||||||
-dontwarn com.yalantis.ucrop**
|
-dontwarn com.yalantis.ucrop**
|
||||||
-keep class com.yalantis.ucrop** { *; }
|
-keep class com.yalantis.ucrop** { *; }
|
||||||
-keep interface com.yalantis.ucrop** { *; }
|
-keep interface com.yalantis.ucrop** { *; }
|
||||||
# 禁用 JPXDecode(JPEG2000),避免调用 JP2Decoder
|
|
||||||
-assumenosideeffects class com.tom_roush.pdfbox.filter.JPXFilter {
|
|
||||||
*;
|
|
||||||
}
|
|
||||||
# 防止缺少 gemalto 的 JP2Decoder 报错
|
|
||||||
-dontwarn com.gemalto.jp2.**
|
|
||||||
-dontwarn com.tom_roush.pdfbox.filter.JPXFilter
|
|
||||||
|
|
||||||
# 保留所有 Parcelable 类
|
# 保留所有 Parcelable 类
|
||||||
-keep class * implements android.os.Parcelable { *; }
|
-keep class * implements android.os.Parcelable { *; }
|
||||||
@ -47,3 +40,14 @@
|
|||||||
public static final android.os.Parcelable$Creator *;
|
public static final android.os.Parcelable$Creator *;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ===== PDFBox 全保留 =====
|
||||||
|
-keep class com.tom_roush.pdfbox.** { *; }
|
||||||
|
|
||||||
|
# 防止缺少 gemalto 的 JP2Decoder 报错
|
||||||
|
-dontwarn com.tom_roush.pdfbox.filter.JPXFilter
|
||||||
|
-dontwarn com.gemalto.jp2.**
|
||||||
|
|
||||||
|
# ===== 属性 =====
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keepattributes Signature
|
||||||
|
-keepattributes InnerClasses
|
||||||
|
|||||||
@ -166,13 +166,6 @@ class PdfToImageActivity : BaseActivity() {
|
|||||||
inputFile = file,
|
inputFile = file,
|
||||||
password = password,
|
password = password,
|
||||||
onError = { e ->
|
onError = { e ->
|
||||||
runOnUiThread {
|
|
||||||
ToastUtils.show(
|
|
||||||
this@PdfToImageActivity,
|
|
||||||
getString(R.string.file_not_pdf_or_corrupted)
|
|
||||||
)
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
).collect { pageItem ->
|
).collect { pageItem ->
|
||||||
|
|
||||||
|
|||||||
@ -201,13 +201,6 @@ class SplitPdfActivity : BaseActivity() {
|
|||||||
inputFile = file,
|
inputFile = file,
|
||||||
password = password,
|
password = password,
|
||||||
onError = { e ->
|
onError = { e ->
|
||||||
runOnUiThread {
|
|
||||||
ToastUtils.show(
|
|
||||||
this@SplitPdfActivity,
|
|
||||||
getString(R.string.file_not_pdf_or_corrupted)
|
|
||||||
)
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
).collect { pageItem ->
|
).collect { pageItem ->
|
||||||
logDebug("splitPdfToPageItemsFlow pageItem->$pageItem")
|
logDebug("splitPdfToPageItemsFlow pageItem->$pageItem")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user