summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt/Resource.cpp')
-rw-r--r--tools/aapt/Resource.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index cafd635..7ffd43b 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -678,6 +678,13 @@ status_t massageManifest(Bundle* bundle, sp<XMLNode> root)
bundle->getMaxSdkVersion());
}
+ if (bundle->getDebugMode()) {
+ sp<XMLNode> 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<AaptAssets>& 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) {