mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01: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, "name", res.getResSpec().getName());
|
||||
serializer.text(toResXmlFormat());
|
||||
|
||||
String body = toResXmlFormat();
|
||||
if (! body.isEmpty()) {
|
||||
serializer.ignorableWhitespace(body);
|
||||
}
|
||||
|
||||
serializer.endTag(null, tagName);
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,6 @@ public class ResStringValue extends ResScalarValue
|
||||
|
||||
@Override
|
||||
public String toResXmlFormat() {
|
||||
if (mValue.isEmpty()) {
|
||||
return mValue;
|
||||
}
|
||||
return AndrolibResources.escapeForResXml(mValue);
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ public class ARSCDecoder {
|
||||
int data = mIn.readInt();
|
||||
|
||||
return type == TypedValue.TYPE_STRING ?
|
||||
mPkg.getValueFactory().factory(mTableStrings.getString(data)) :
|
||||
mPkg.getValueFactory().factory(mTableStrings.getHTML(data)) :
|
||||
mPkg.getValueFactory().factory(type, data);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user