AndrolibResources.loadFrameworkPkg(): added check for loaded pkg id.

This commit is contained in:
Ryszard Wiśniewski 2010-06-02 00:43:31 +02:00
parent 28d4457481
commit ce9c6304af

View File

@ -82,8 +82,14 @@ final public class AndrolibResources {
"Arsc files with zero or multiple packages");
}
resTable.addPackage(pkgs[0], false);
return pkgs[0];
ResPackage pkg = pkgs[0];
if (pkg.getId() != id) {
throw new AndrolibException("Expected pkg of id: " +
String.valueOf(id) + ", got: " + pkg.getId());
}
resTable.addPackage(pkg, false);
return pkg;
}
public void decode(ResTable resTable, ExtFile apkFile, File outDir)