uncomment PackageParser.parsePackage()

This commit is contained in:
Julian Winkler 2025-03-25 18:53:41 +01:00
parent 4648dd3249
commit 5a4f56f4ba

View file

@ -492,7 +492,7 @@ public class PackageParser {
} }
public Package parsePackage(File sourceFile, String destCodePath, public Package parsePackage(File sourceFile, String destCodePath,
DisplayMetrics metrics, int flags) { /* DisplayMetrics metrics, int flags) {
mParseError = PackageManager.INSTALL_SUCCEEDED; mParseError = PackageManager.INSTALL_SUCCEEDED;
mArchiveSourcePath = sourceFile.getPath(); mArchiveSourcePath = sourceFile.getPath();
@ -521,7 +521,7 @@ public class PackageParser {
boolean assetError = true; boolean assetError = true;
try { try {
assmgr = new AssetManager(); assmgr = new AssetManager();
int cookie = assmgr.addAssetPath(mArchiveSourcePath); int cookie = 1; assmgr.addAssetPath(mArchiveSourcePath);
if (cookie != 0) { if (cookie != 0) {
res = new Resources(assmgr, metrics, null); res = new Resources(assmgr, metrics, null);
assmgr.setConfiguration(0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, assmgr.setConfiguration(0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@ -583,8 +583,6 @@ public class PackageParser {
pkg.mSignatures = null; pkg.mSignatures = null;
return pkg; return pkg;
*/
return null;
} }
/** /**