mirror of
https://github.com/iBotPeaches/Apktool.git
synced 2024-12-13 23:48:49 +00:00
fixes #37 reverts public.xml change
This commit is contained in:
parent
18fc242bba
commit
ca623f6617
@ -114,7 +114,7 @@ public class ClassFileNameHandler {
|
||||
|
||||
try {
|
||||
FileWriter writer = new FileWriter(f);
|
||||
writer.write("test");
|
||||
//writer.write("test");
|
||||
writer.flush();
|
||||
writer.close();
|
||||
f.delete(); //doesn't throw IOException
|
||||
|
@ -356,32 +356,32 @@ final public class AndrolibResources {
|
||||
|
||||
private void generatePublicXml(ResPackage pkg, Directory out,
|
||||
XmlSerializer serial) throws AndrolibException {
|
||||
// try {
|
||||
// OutputStream outStream = out.getFileOutput("values/public.xml");
|
||||
// serial.setOutput(outStream, null);
|
||||
// serial.startDocument(null, null);
|
||||
// serial.startTag(null, "resources");
|
||||
//
|
||||
// for (ResResSpec spec : pkg.listResSpecs()) {
|
||||
// serial.startTag(null, "public");
|
||||
// serial.attribute(null, "type", spec.getType().getName());
|
||||
// serial.attribute(null, "name", spec.getName());
|
||||
// serial.attribute(null, "id", String.format(
|
||||
// "0x%08x", spec.getId().id));
|
||||
// serial.endTag(null, "public");
|
||||
// }
|
||||
//
|
||||
// serial.endTag(null, "resources");
|
||||
// serial.endDocument();
|
||||
// serial.flush();
|
||||
// outStream.close();
|
||||
// } catch (IOException ex) {
|
||||
// throw new AndrolibException(
|
||||
// "Could not generate public.xml file", ex);
|
||||
// } catch (DirectoryException ex) {
|
||||
// throw new AndrolibException(
|
||||
// "Could not generate public.xml file", ex);
|
||||
// }
|
||||
try {
|
||||
OutputStream outStream = out.getFileOutput("values/public.xml");
|
||||
serial.setOutput(outStream, null);
|
||||
serial.startDocument(null, null);
|
||||
serial.startTag(null, "resources");
|
||||
|
||||
for (ResResSpec spec : pkg.listResSpecs()) {
|
||||
serial.startTag(null, "public");
|
||||
serial.attribute(null, "type", spec.getType().getName());
|
||||
serial.attribute(null, "name", spec.getName());
|
||||
serial.attribute(null, "id", String.format(
|
||||
"0x%08x", spec.getId().id));
|
||||
serial.endTag(null, "public");
|
||||
}
|
||||
|
||||
serial.endTag(null, "resources");
|
||||
serial.endDocument();
|
||||
serial.flush();
|
||||
outStream.close();
|
||||
} catch (IOException ex) {
|
||||
throw new AndrolibException(
|
||||
"Could not generate public.xml file", ex);
|
||||
} catch (DirectoryException ex) {
|
||||
throw new AndrolibException(
|
||||
"Could not generate public.xml file", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private ResPackage[] getResPackagesFromApk(ExtFile apkFile,
|
||||
|
Loading…
Reference in New Issue
Block a user