mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-04 07:44:26 +02:00
ARSCDecoder: decode strings with their stylings.
This commit is contained in:
parent
29fd92b2c4
commit
a85eff1aef
@ -46,7 +46,12 @@ public abstract class ResScalarValue extends ResValue
|
|||||||
serializer.attribute(null, "type", type);
|
serializer.attribute(null, "type", type);
|
||||||
}
|
}
|
||||||
serializer.attribute(null, "name", res.getResSpec().getName());
|
serializer.attribute(null, "name", res.getResSpec().getName());
|
||||||
serializer.text(toResXmlFormat());
|
|
||||||
|
String body = toResXmlFormat();
|
||||||
|
if (! body.isEmpty()) {
|
||||||
|
serializer.ignorableWhitespace(body);
|
||||||
|
}
|
||||||
|
|
||||||
serializer.endTag(null, tagName);
|
serializer.endTag(null, tagName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,9 +41,6 @@ public class ResStringValue extends ResScalarValue
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toResXmlFormat() {
|
public String toResXmlFormat() {
|
||||||
if (mValue.isEmpty()) {
|
return mValue;
|
||||||
return mValue;
|
|
||||||
}
|
|
||||||
return AndrolibResources.escapeForResXml(mValue);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ public class ARSCDecoder {
|
|||||||
int data = mIn.readInt();
|
int data = mIn.readInt();
|
||||||
|
|
||||||
return type == TypedValue.TYPE_STRING ?
|
return type == TypedValue.TYPE_STRING ?
|
||||||
mPkg.getValueFactory().factory(mTableStrings.getString(data)) :
|
mPkg.getValueFactory().factory(mTableStrings.getHTML(data)) :
|
||||||
mPkg.getValueFactory().factory(type, data);
|
mPkg.getValueFactory().factory(type, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user