fix: do not flag resource table as sparse when main package is not loaded

This commit is contained in:
oSumAtrIX 2023-08-27 22:14:43 +02:00
parent c44558cacd
commit b832812767
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -83,6 +83,16 @@ class ResourceContext internal constructor(
versionInfo.let {
metadata.packageVersion = it.versionName ?: it.versionCode
}
/*
The ResTable if flagged as sparse if the main package is not loaded, which is the case here,
because ResourcesDecoder.decodeResources loads the main package
and not XmlPullStreamDecoder.decodeManifest.
See ARSCDecoder.readTableType for more info.
Set this to false again to prevent the ResTable from being flagged as sparse falsely.
*/
metadata.apkInfo.sparseResources = false
}
}
}