X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/afd401ed5a698fa1008d4f276b8a47c913adfa98..7b43ace87b903db560d233004164d0e56e357137:/Resource.cpp diff --git a/Resource.cpp b/Resource.cpp index bd84e23..822262e 100644 --- a/Resource.cpp +++ b/Resource.cpp @@ -542,11 +542,11 @@ static bool applyFileOverlay(Bundle *bundle, 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 @@ static bool applyFileOverlay(Bundle *bundle, 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 @@ status_t massageManifest(Bundle* bundle, sp root) 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) { @@ -828,7 +835,9 @@ status_t buildResources(Bundle* bundle, const sp& assets) bool hasErrors = false; if (drawables != NULL) { - err = preProcessImages(bundle, assets, drawables); + if (bundle->getOutputAPKFile() != NULL) { + err = preProcessImages(bundle, assets, drawables); + } if (err == NO_ERROR) { err = makeFileResources(bundle, assets, &table, drawables, "drawable"); if (err != NO_ERROR) { @@ -2074,12 +2083,13 @@ writeProguardForLayouts(ProguardKeepSet* keep, const sp& assets) // 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();