From bdfc28c20f107c315b1e27e86d7c1684c50cb77b Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 15 Sep 2016 08:36:25 -0400 Subject: [PATCH] add support for TYPE_DYNAMIC_ATTRIBUTE --- .../apktool-lib/src/main/java/android/util/TypedValue.java | 5 +++++ .../java/brut/androlib/res/data/value/ResValueFactory.java | 1 + 2 files changed, 6 insertions(+) diff --git a/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java b/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java index 2587b0e3..8dc3922d 100644 --- a/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java +++ b/brut.apktool/apktool-lib/src/main/java/android/util/TypedValue.java @@ -56,6 +56,11 @@ public class TypedValue { * resolved before it can be used like TYPE_REFERENCE */ public static final int TYPE_DYNAMIC_REFERENCE = 0x07; + /** + * The data an attribute resource identifier, which needs to be resolved + * before it can be used like a TYPE_ATTRIBUTE. + */ + public static final int TYPE_DYNAMIC_ATTRIBUTE = 0x08; /** * Identifies the start of plain integer values. Any type value from this to * {@link #TYPE_LAST_INT} means the data field holds a generic diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java index 031f5a47..4b14209e 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/value/ResValueFactory.java @@ -55,6 +55,7 @@ public class ResValueFactory { case TypedValue.TYPE_INT_BOOLEAN: return new ResBoolValue(value != 0, value, rawValue); case TypedValue.TYPE_DYNAMIC_REFERENCE: + case TypedValue.TYPE_DYNAMIC_ATTRIBUTE: return newReference(value, rawValue); }