From: Xavier Ducrohet Date: Tue, 31 Aug 2010 21:35:28 +0000 (-0700) Subject: am b4649ec7: am 23827557: Merge "Add a --debug-mode option to aapt." into gingerbread X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/c6353f67fd5d2c82abec98219f65eaa701fda757?hp=-c am b4649ec7: am 23827557: Merge "Add a --debug-mode option to aapt." into gingerbread Merge commit 'b4649ec720fa959b700a7a03c089bfdc61321d16' * commit 'b4649ec720fa959b700a7a03c089bfdc61321d16': Add a --debug-mode option to aapt. --- c6353f67fd5d2c82abec98219f65eaa701fda757 diff --combined Resource.cpp index 498b193,9c5fcda..01728a1 --- a/Resource.cpp +++ b/Resource.cpp @@@ -542,11 -542,11 +542,11 @@@ static bool applyFileOverlay(Bundle *bu DefaultKeyedVector > baseFiles = baseGroup->getFiles(); for (size_t i=0; i < baseFiles.size(); i++) { - printf("baseFile %ld has flavor %s\n", i, + printf("baseFile %d has flavor %s\n", i, baseFiles.keyAt(i).toString().string()); } for (size_t i=0; i < overlayFiles.size(); i++) { - printf("overlayFile %ld has flavor %s\n", i, + printf("overlayFile %d has flavor %s\n", i, overlayFiles.keyAt(i).toString().string()); } } @@@ -560,7 -560,7 +560,7 @@@ keyAt(overlayGroupIndex)); if(baseFileIndex < UNKNOWN_ERROR) { if (bundle->getVerbose()) { - printf("found a match (%ld) for overlay file %s, for flavor %s\n", + printf("found a match (%d) for overlay file %s, for flavor %s\n", baseFileIndex, overlayGroup->getLeaf().string(), overlayFiles.keyAt(overlayGroupIndex).toString().string()); @@@ -678,6 -678,13 +678,13 @@@ status_t massageManifest(Bundle* bundle bundle->getMaxSdkVersion()); } + if (bundle->getDebugMode()) { + sp application = root->getChildElement(String16(), String16("application")); + if (application != NULL) { + addTagAttribute(application, RESOURCES_ANDROID_NAMESPACE, "debuggable", "true"); + } + } + // Deal with manifest package name overrides const char* manifestPackageNameOverride = bundle->getManifestPackageNameOverride(); if (manifestPackageNameOverride != NULL) { @@@ -2074,13 -2081,12 +2081,13 @@@ writeProguardForLayouts(ProguardKeepSet // tag:attribute pairs that should be checked in layout files. KeyedVector kLayoutTagAttrPairs; addTagAttrPair(&kLayoutTagAttrPairs, "view", NULL, "class"); + addTagAttrPair(&kLayoutTagAttrPairs, "fragment", NULL, "class"); addTagAttrPair(&kLayoutTagAttrPairs, "fragment", RESOURCES_ANDROID_NAMESPACE, "name"); // tag:attribute pairs that should be checked in xml files. KeyedVector kXmlTagAttrPairs; addTagAttrPair(&kXmlTagAttrPairs, "PreferenceScreen", RESOURCES_ANDROID_NAMESPACE, "fragment"); - addTagAttrPair(&kXmlTagAttrPairs, "Header", RESOURCES_ANDROID_NAMESPACE, "fragment"); + addTagAttrPair(&kXmlTagAttrPairs, "header", RESOURCES_ANDROID_NAMESPACE, "fragment"); const Vector >& dirs = assets->resDirs(); const size_t K = dirs.size();