From 14589e3593084150d199d841a430e21d12ef73d6 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sun, 19 Apr 2015 07:44:57 -0500 Subject: [PATCH] If passed string isn't a reference, don't look for it. --- .../src/main/java/brut/androlib/res/xml/ResXmlPatcher.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java index ef71e962..b2d4efbd 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/xml/ResXmlPatcher.java @@ -125,6 +125,10 @@ public final class ResXmlPatcher { * @throws AndrolibException */ public static String pullValueFromStrings(File directory, String key) throws AndrolibException { + if (! key.contains("@")) { + return null; + } + File file = new File(directory, "/res/values/strings.xml"); key = key.replace("@string/", "");