未验证 提交 ae2d4da5 编写于 作者: J Jan S 提交者: GitHub

fix(res): XML "@null" decoding (#1583)(PR #1594)

minor improvements
上级 691d5cd1
......@@ -428,7 +428,9 @@ public class Deobfuscator {
return "Enum";
}
String result = "";
if (cls.getAccessFlags().isAbstract()) {
if (cls.getAccessFlags().isInterface()) {
result += "Interface";
} else if (cls.getAccessFlags().isAbstract()) {
result += "Abstract";
}
......
......@@ -168,11 +168,13 @@ public class ResXmlGen {
private void addItem(ICodeWriter cw, String itemTag, String typeName, RawNamedValue value) {
String nameStr = vp.decodeNameRef(value.getNameRef());
String valueStr = vp.decodeValue(value.getRawValue());
int dataType = value.getRawValue().getDataType();
if (!typeName.equals("attr")) {
if (valueStr == null || valueStr.equals("0")) {
if (dataType == ParserConstants.TYPE_REFERENCE && (valueStr == null || valueStr.equals("0"))) {
valueStr = "@null";
}
if (nameStr != null) {
if (dataType == ParserConstants.TYPE_INT_DEC && nameStr != null) {
try {
int intVal = Integer.parseInt(valueStr);
String newVal = ManifestAttributes.getInstance().decode(nameStr.replace("android:attr.", ""), intVal);
......
......@@ -411,7 +411,7 @@ public class MainWindow extends JFrame {
// check if project file already saved with default name
Path projectPath = getProjectPathForFile(singleFile);
if (Files.exists(projectPath)) {
LOG.info("Loading project for this file");
LOG.info("Loading project {}", projectPath);
openProject(projectPath, onFinish);
return true;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册