diff --git a/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java b/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java index e405bb86..f5b5bdf3 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java +++ b/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java @@ -19,7 +19,7 @@ package brut.androlib.res; import brut.androlib.AndrolibException; import brut.androlib.err.CantFindFrameworkResException; import brut.androlib.res.data.*; -import brut.androlib.res.data.value.ResXmlSerializable; +import brut.androlib.res.data.value.ResValuesXmlSerializable; import brut.androlib.res.decoder.*; import brut.androlib.res.decoder.ARSCDecoder.ARSCData; import brut.androlib.res.decoder.ARSCDecoder.FlagsOffset; @@ -262,8 +262,8 @@ final public class AndrolibResources { if (valuesFile.isSynthesized(res)) { continue; } - ((ResXmlSerializable) res.getValue()) - .serializeToXml(serial, res); + ((ResValuesXmlSerializable) res.getValue()) + .serializeToResValuesXml(serial, res); } serial.endTag(null, "resources"); diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java b/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java index 9c513941..1ba70f0b 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java @@ -21,7 +21,7 @@ import brut.androlib.AndrolibException; import brut.androlib.res.data.value.ResFileValue; import brut.androlib.res.data.value.ResValue; import brut.androlib.res.data.value.ResValueFactory; -import brut.androlib.res.data.value.ResXmlSerializable; +import brut.androlib.res.data.value.ResValuesXmlSerializable; import brut.util.Duo; import java.util.*; @@ -123,7 +123,7 @@ public class ResPackage { new HashMap, ResValuesFile>(); for (ResResSpec spec : mResSpecs.values()) { for (ResResource res : spec.listResources()) { - if (res.getValue() instanceof ResXmlSerializable) { + if (res.getValue() instanceof ResValuesXmlSerializable) { ResType type = res.getResSpec().getType(); ResConfig config = res.getConfig(); Duo key = diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java index 1b7d45bd..483a75c6 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResArrayValue.java @@ -25,7 +25,7 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public class ResArrayValue extends ResBagValue implements ResXmlSerializable { +public class ResArrayValue extends ResBagValue implements ResValuesXmlSerializable { ResArrayValue(ResReferenceValue parent, Duo[] items) { super(parent); @@ -42,7 +42,7 @@ public class ResArrayValue extends ResBagValue implements ResXmlSerializable { } @Override - public void serializeToXml(XmlSerializer serializer, ResResource res) + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { String type = getType(); type = (type == null ? "" : type + "-") + "array"; diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java index c0d36f78..96944f9f 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResAttr.java @@ -26,7 +26,7 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public class ResAttr extends ResBagValue implements ResXmlSerializable { +public class ResAttr extends ResBagValue implements ResValuesXmlSerializable { ResAttr(ResReferenceValue parentVal, int type, Integer min, Integer max, Boolean l10n) { super(parentVal); @@ -42,7 +42,7 @@ public class ResAttr extends ResBagValue implements ResXmlSerializable { } @Override - public void serializeToXml(XmlSerializer serializer, ResResource res) + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { String type = getTypeAsString(); diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java index de52434f..1aab532f 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBagValue.java @@ -25,29 +25,29 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public class ResBagValue extends ResValue implements ResXmlSerializable { +public class ResBagValue extends ResValue implements ResValuesXmlSerializable { protected final ResReferenceValue mParent; public ResBagValue(ResReferenceValue parent) { this.mParent = parent; } - public void serializeToXml(XmlSerializer serializer, ResResource res) + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { String type = res.getResSpec().getType().getName(); if ("style".equals(type)) { new ResStyleValue(mParent, new Duo[0], null) - .serializeToXml(serializer, res); + .serializeToResValuesXml(serializer, res); return; } if ("array".equals(type)) { new ResArrayValue(mParent, new Duo[0]) - .serializeToXml(serializer, res); + .serializeToResValuesXml(serializer, res); return; } if ("plurals".equals(type)) { new ResPluralsValue(mParent, new Duo[0]) - .serializeToXml(serializer, res); + .serializeToResValuesXml(serializer, res); return; } diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java index de939150..5e45179e 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResBoolValue.java @@ -19,7 +19,7 @@ package brut.androlib.res.data.value; /** * @author Ryszard Wiśniewski */ -public class ResBoolValue extends ResScalarValue implements ResXmlSerializable { +public class ResBoolValue extends ResScalarValue implements ResValuesXmlSerializable { private final boolean mValue; public ResBoolValue(boolean value) { diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java index f682b27d..ca6196e2 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIdValue.java @@ -24,8 +24,8 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public class ResIdValue extends ResValue implements ResXmlSerializable { - public void serializeToXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { +public class ResIdValue extends ResValue implements ResValuesXmlSerializable { + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { serializer.startTag(null, "item"); serializer.attribute(null, "type", res.getResSpec().getType().getName()); serializer.attribute(null, "name", res.getResSpec().getName()); diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java index 4d481d28..5fc7c8ff 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResIntValue.java @@ -21,7 +21,7 @@ import brut.androlib.AndrolibException; /** * @author Ryszard Wiśniewski */ -public class ResIntValue extends ResScalarValue implements ResXmlSerializable { +public class ResIntValue extends ResScalarValue implements ResValuesXmlSerializable { protected final int mValue; public ResIntValue(int value) { diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java index 1d00ea1f..d01e3ef5 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResPluralsValue.java @@ -25,7 +25,7 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public class ResPluralsValue extends ResBagValue implements ResXmlSerializable { +public class ResPluralsValue extends ResBagValue implements ResValuesXmlSerializable { ResPluralsValue(ResReferenceValue parent, Duo[] items) { super(parent); @@ -43,7 +43,7 @@ public class ResPluralsValue extends ResBagValue implements ResXmlSerializable { } @Override - public void serializeToXml(XmlSerializer serializer, ResResource res) + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { serializer.startTag(null, "plurals"); serializer.attribute(null, "name", res.getResSpec().getName()); diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java index c28d11c1..d955dc13 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResScalarValue.java @@ -25,7 +25,7 @@ import org.xmlpull.v1.XmlSerializer; * @author Ryszard Wiśniewski */ public abstract class ResScalarValue extends ResValue - implements ResXmlPrintable, ResXmlSerializable { + implements ResXmlPrintable, ResValuesXmlSerializable { protected final String mType; protected ResScalarValue(String type) { @@ -34,7 +34,7 @@ public abstract class ResScalarValue extends ResValue public abstract String toResXmlFormat() throws AndrolibException; - public void serializeToXml(XmlSerializer serializer, ResResource res) + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { String type = res.getResSpec().getType().getName(); boolean item = ! "reference".equals(mType) && ! type.equals(mType); diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java index d8e9335b..abe9a17b 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStringValue.java @@ -22,7 +22,7 @@ import brut.androlib.res.AndrolibResources; * @author Ryszard Wiśniewski */ public class ResStringValue extends ResScalarValue - implements ResXmlSerializable { + implements ResValuesXmlSerializable { private final String mValue; public ResStringValue(String value) { diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java index 7969e2e8..0cc880a7 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResStyleValue.java @@ -26,7 +26,7 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public class ResStyleValue extends ResBagValue implements ResXmlSerializable { +public class ResStyleValue extends ResBagValue implements ResValuesXmlSerializable { ResStyleValue(ResReferenceValue parent, Duo[] items, ResValueFactory factory) { super(parent); @@ -39,7 +39,7 @@ public class ResStyleValue extends ResBagValue implements ResXmlSerializable { } @Override - public void serializeToXml(XmlSerializer serializer, ResResource res) + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException { serializer.startTag(null, "style"); serializer.attribute(null, "name", res.getResSpec().getName()); diff --git a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResXmlSerializable.java b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValuesXmlSerializable.java similarity index 88% rename from apktool-lib/src/main/java/brut/androlib/res/data/value/ResXmlSerializable.java rename to apktool-lib/src/main/java/brut/androlib/res/data/value/ResValuesXmlSerializable.java index 0dbc2232..099f86de 100644 --- a/apktool-lib/src/main/java/brut/androlib/res/data/value/ResXmlSerializable.java +++ b/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValuesXmlSerializable.java @@ -24,7 +24,7 @@ import org.xmlpull.v1.XmlSerializer; /** * @author Ryszard Wiśniewski */ -public interface ResXmlSerializable { - public void serializeToXml(XmlSerializer serializer, ResResource res) +public interface ResValuesXmlSerializable { + public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException; }