Remove test function

This commit is contained in:
Syer10
2026-07-12 23:00:44 -04:00
parent d65a004a17
commit 47f0e60659
2 changed files with 1 additions and 30 deletions

View File

@@ -136,6 +136,7 @@ object AndroidManifestParser {
val pathPattern: String? = null,
)
@OptIn(ExperimentalXmlUtilApi::class)
private val xml =
XML {
autoPolymorphic = false

View File

@@ -16,36 +16,6 @@ object ResourceArscIconParser {
val path: String,
)
fun extractIcon(
jar: Path,
iconPath: Path,
) {
ZipFile
.builder()
.setPath(jar)
.get()
.use { zip ->
val packages =
zip
.getInputStream(zip.getEntry("resources.arsc"))
.use { ArscParser(it.readBytes()).parse() }
val icon =
packages
.flatMap { it.iconCandidates() }
.maxByOrNull { it.density }
?: return
val entry = zip.getEntry(icon.path) ?: return
zip.getInputStream(entry).use {
iconPath.outputStream().use { out ->
it.copyTo(out)
}
}
}
}
fun extractIcon(zip: ZipFile): InputStream {
val packages =
zip