diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlLine.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlLine.java index 07bce3ef75..5ecd86d548 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlLine.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlLine.java @@ -66,7 +66,7 @@ public static String unescape(String value) { public String getValue() { if (value.equals("null")) return null; - String res = YamlStringEscapeUtils.unescapeString(value); + String res = unescape(value); // remove quotation marks res = res.replaceAll("^\"|\"$", ""); res = res.replaceAll("^'|'$", ""); @@ -74,7 +74,7 @@ public String getValue() { } public String getKey() { - String res = YamlStringEscapeUtils.unescapeString(key); + String res = unescape(key); // remove quotation marks res = res.replaceAll("^\"|\"$", ""); res = res.replaceAll("^'|'$", ""); diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlReader.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlReader.java index 2222dff412..be7d2cefca 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlReader.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlReader.java @@ -16,10 +16,6 @@ public YamlReader(InputStream in) { read(in); } - public int getLineNo() { - return mCurrent + 1; - } - public void pushLine() { if (mCurrent > 0) mCurrent--; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlWriter.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlWriter.java index bb6629b28e..7cc921641a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlWriter.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/apk/YamlWriter.java @@ -20,10 +20,6 @@ public void close() throws IOException { mWriter.close(); } - public int getIndent() { - return mIndent; - } - public String getIndentString() { // for java 11 // return " ".repeat(mIndent); @@ -48,11 +44,6 @@ public void writeIndent() { mWriter.print(getIndentString()); } - public void writeInt(String key, int value) { - writeIndent(); - mWriter.println(escape(key) + ": " + value); - } - public void writeBool(String key, boolean value) { writeIndent(); String val = value ? "true": "false"; @@ -85,19 +76,6 @@ public void writeList(String key, List list) { } } - public void writeCommonMap(String key, Map map) { - if (Objects.isNull(map)) - return; - writeIndent(); - mWriter.println(escape(key) + ":"); - nextIndent(); - for (K mapKey: map.keySet()) { - writeIndent(); - mWriter.println(mapKey + ": " + map.get(mapKey)); - } - prevIndent(); - } - public void writeStringMap(String key, Map map) { if (Objects.isNull(map)) return;