diff options
| -rw-r--r-- | tools/aapt/Resource.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 5bb2ce1..cf734c1 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; } |
