mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-16 09:14:09 -05:00
Fix memory leak on APK extension install
This commit is contained in:
@@ -95,7 +95,7 @@ object PackageTools {
|
||||
/** A modified version of `xyz.nulldev.androidcompat.pm.InstalledPackage.info` */
|
||||
fun getPackageInfo(apkFile: Path): PackageInfo =
|
||||
ApkParsers.getMetaInfo(apkFile.toFile()).toPackageInfo(apkFile.toFile()).apply {
|
||||
val parsed = ApkFile(apkFile.toFile())
|
||||
ApkFile(apkFile.toFile()).use { parsed ->
|
||||
val dbFactory = DocumentBuilderFactory.newInstance()
|
||||
val dBuilder = dbFactory.newDocumentBuilder()
|
||||
val doc =
|
||||
@@ -136,6 +136,7 @@ object PackageTools {
|
||||
.map { Signature(it.data) }
|
||||
.toTypedArray()
|
||||
}
|
||||
}
|
||||
|
||||
fun getSignatureHash(pkgInfo: PackageInfo): String? {
|
||||
val signatures = pkgInfo.signatures
|
||||
|
||||
Reference in New Issue
Block a user