mirror of
https://github.com/revanced/Apktool.git
synced 2025-04-30 22:24:25 +02:00
ResXmlSerializer -> ExtMXSerializer
This commit is contained in:
parent
a9ab437ae0
commit
d42798fd92
@ -22,6 +22,7 @@ import brut.androlib.res.data.*;
|
|||||||
import brut.androlib.res.data.value.ResFileValue;
|
import brut.androlib.res.data.value.ResFileValue;
|
||||||
import brut.androlib.res.data.value.ResXmlSerializable;
|
import brut.androlib.res.data.value.ResXmlSerializable;
|
||||||
import brut.androlib.res.decoder.*;
|
import brut.androlib.res.decoder.*;
|
||||||
|
import brut.androlib.res.util.ExtMXSerializer;
|
||||||
import brut.common.BrutException;
|
import brut.common.BrutException;
|
||||||
import brut.directory.*;
|
import brut.directory.*;
|
||||||
import brut.util.*;
|
import brut.util.*;
|
||||||
@ -63,7 +64,7 @@ final public class AndrolibResources {
|
|||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResXmlSerializer xmlSerializer = getResXmlSerializer();
|
ExtMXSerializer xmlSerializer = getResXmlSerializer();
|
||||||
for (ResPackage pkg : resTable.listMainPackages()) {
|
for (ResPackage pkg : resTable.listMainPackages()) {
|
||||||
attrDecoder.setCurrentPackage(pkg);
|
attrDecoder.setCurrentPackage(pkg);
|
||||||
for (ResResource res : pkg.listFiles()) {
|
for (ResResource res : pkg.listFiles()) {
|
||||||
@ -139,8 +140,8 @@ final public class AndrolibResources {
|
|||||||
new ResFileDecoder(decoders), attrDecoder);
|
new ResFileDecoder(decoders), attrDecoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResXmlSerializer getResXmlSerializer() {
|
public ExtMXSerializer getResXmlSerializer() {
|
||||||
ResXmlSerializer serial = new ResXmlSerializer();
|
ExtMXSerializer serial = new ExtMXSerializer();
|
||||||
serial.setProperty(serial.PROPERTY_SERIALIZER_INDENTATION, " ");
|
serial.setProperty(serial.PROPERTY_SERIALIZER_INDENTATION, " ");
|
||||||
serial.setProperty(serial.PROPERTY_SERIALIZER_LINE_SEPARATOR,
|
serial.setProperty(serial.PROPERTY_SERIALIZER_LINE_SEPARATOR,
|
||||||
System.getProperty("line.separator"));
|
System.getProperty("line.separator"));
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package brut.androlib.res.decoder;
|
package brut.androlib.res.util;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
@ -24,7 +24,7 @@ import org.xmlpull.mxp1_serializer.MXSerializer;
|
|||||||
/**
|
/**
|
||||||
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||||
*/
|
*/
|
||||||
public class ResXmlSerializer extends MXSerializer {
|
public class ExtMXSerializer extends MXSerializer {
|
||||||
@Override
|
@Override
|
||||||
public void startDocument(String encoding, Boolean standalone) throws
|
public void startDocument(String encoding, Boolean standalone) throws
|
||||||
IOException, IllegalArgumentException, IllegalStateException {
|
IOException, IllegalArgumentException, IllegalStateException {
|
Loading…
x
Reference in New Issue
Block a user