summaryrefslogtreecommitdiff
path: root/libs/androidfw/tests/ResTable_test.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2016-05-10 10:01:12 -0700
committerAdam Lesinski <adamlesinski@google.com>2016-05-10 10:45:52 -0700
commit8ac51d14b614ba6a12df2ba90d50a01f50d548aa (patch)
treeb2afded5a45d6c5d14569b6691354d1613c1eb81 /libs/androidfw/tests/ResTable_test.cpp
parentb42afe9be02b23c50c0479e93df2a853be7c369a (diff)
Resource shared libraries: fix theme references
Theme values that would reference other theme values would not work if they were declared in a shared library. We now introduce a parallel resource type to TYPE_DYNAMIC_REFERENCE, TYPE_DYNAMIC_ATTRIBUTE, which allows us to lookup and resolve theme value references from shared libraries. Bug:28687378 Change-Id: I4f2364e3e8b567679f90784fcaaea12b6b05e926
Diffstat (limited to 'libs/androidfw/tests/ResTable_test.cpp')
-rw-r--r--libs/androidfw/tests/ResTable_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/androidfw/tests/ResTable_test.cpp b/libs/androidfw/tests/ResTable_test.cpp
index b8b46259f0d1..9e53dd279195 100644
--- a/libs/androidfw/tests/ResTable_test.cpp
+++ b/libs/androidfw/tests/ResTable_test.cpp
@@ -131,6 +131,11 @@ TEST(ResTableTest, libraryThemeIsAppliedCorrectly) {
ASSERT_GE(index, 0);
ASSERT_EQ(Res_value::TYPE_INT_DEC, val.dataType);
ASSERT_EQ(uint32_t(700), val.data);
+
+ index = theme.getAttribute(lib::R::attr::attr2, &val, &specFlags);
+ ASSERT_GE(index, 0);
+ ASSERT_EQ(Res_value::TYPE_INT_DEC, val.dataType);
+ ASSERT_EQ(uint32_t(700), val.data);
}
TEST(ResTableTest, referenceToBagIsNotResolved) {