summaryrefslogtreecommitdiff
path: root/tools/aapt/Resource.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-12-03 00:05:33 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-03 00:05:33 +0000
commit3550c6c5d67740b8ea77b2921146780fe340f34e (patch)
treea0b7e0943d0ac21b9fef5972302011ddaa2c152e /tools/aapt/Resource.cpp
parent233d700efc5f308fe32acc5984b636860e4fc7b0 (diff)
parentf17611a29e3b0d0c7a5d28a1ce92682a2c097de6 (diff)
am f17611a2: am 130e30fe: Merge "AAPT: Add custom transition classes to Proguard keep set" into lmp-mr1-dev
* commit 'f17611a29e3b0d0c7a5d28a1ce92682a2c097de6': AAPT: Add custom transition classes to Proguard keep set
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r--tools/aapt/Resource.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 5bb2ce1507e4..cf734c1e0e00 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -3016,6 +3016,8 @@ status_t
writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets)
{
status_t err;
+ const String8 kTransition("transition");
+ const String8 kTransitionPrefix("transition-");
// tag:attribute pairs that should be checked in layout files.
KeyedVector<String8, Vector<NamespaceAttributePair> > kLayoutTagAttrPairs;
@@ -3028,6 +3030,10 @@ writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets)
addTagAttrPair(&kXmlTagAttrPairs, "PreferenceScreen", RESOURCES_ANDROID_NAMESPACE, "fragment");
addTagAttrPair(&kXmlTagAttrPairs, "header", RESOURCES_ANDROID_NAMESPACE, "fragment");
+ // tag:attribute pairs that should be checked in transition files.
+ KeyedVector<String8, Vector<NamespaceAttributePair> > kTransitionTagAttrPairs;
+ addTagAttrPair(&kTransitionTagAttrPairs, kTransition.string(), NULL, "class");
+
const Vector<sp<AaptDir> >& dirs = assets->resDirs();
const size_t K = dirs.size();
for (size_t k=0; k<K; k++) {
@@ -3045,6 +3051,9 @@ writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets)
} else if ((dirName == String8("menu")) || (strncmp(dirName.string(), "menu-", 5) == 0)) {
startTags.add(String8("menu"));
tagAttrPairs = NULL;
+ } else if (dirName == kTransition || (strncmp(dirName.string(), kTransitionPrefix.string(),
+ kTransitionPrefix.size()) == 0)) {
+ tagAttrPairs = &kTransitionTagAttrPairs;
} else {
continue;
}