From 126d66082a7ef75daef4f1dd49273ae2a3961966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ryszard=20Wi=C5=9Bniewski?= Date: Mon, 14 Jun 2010 11:35:13 +0200 Subject: [PATCH] AndrolibResources.getResFileDecoder(): return AXmlResourceParser instead of ResAttrDecoder. --- src/brut/androlib/res/AndrolibResources.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/brut/androlib/res/AndrolibResources.java b/src/brut/androlib/res/AndrolibResources.java index 66d062f4..21a60b0b 100644 --- a/src/brut/androlib/res/AndrolibResources.java +++ b/src/brut/androlib/res/AndrolibResources.java @@ -97,9 +97,9 @@ final public class AndrolibResources { public void decode(ResTable resTable, ExtFile apkFile, File outDir) throws AndrolibException { - Duo duo = getResFileDecoder(); + Duo duo = getResFileDecoder(); ResFileDecoder fileDecoder = duo.m1; - ResAttrDecoder attrDecoder = duo.m2; + ResAttrDecoder attrDecoder = duo.m2.getAttrDecoder(); attrDecoder.setCurrentPackage( resTable.listMainPackages().iterator().next()); @@ -211,20 +211,19 @@ final public class AndrolibResources { new ResSmaliUpdater().updateResIDs(resTable, smaliDir); } - public Duo getResFileDecoder() { + public Duo getResFileDecoder() { ResStreamDecoderContainer decoders = new ResStreamDecoderContainer(); decoders.setDecoder("raw", new ResRawStreamDecoder()); decoders.setDecoder("9patch", new Res9patchStreamDecoder()); - ResAttrDecoder attrDecoder = new ResAttrDecoder(); AXmlResourceParser axmlParser = new AXmlResourceParser(); - axmlParser.setAttrDecoder(attrDecoder); + axmlParser.setAttrDecoder(new ResAttrDecoder()); decoders.setDecoder("xml", new XmlPullStreamDecoder(axmlParser, getResXmlSerializer())); - return new Duo( - new ResFileDecoder(decoders), attrDecoder); + return new Duo( + new ResFileDecoder(decoders), axmlParser); } public ExtMXSerializer getResXmlSerializer() {