summaryrefslogtreecommitdiff
path: root/tools/aapt/Command.cpp
diff options
context:
space:
mode:
author Android (Google) Code Review <android-gerrit@google.com> 2009-06-19 15:37:03 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2009-06-19 15:37:03 -0700
commit1585bd24c10d16351f89e32dddbfa799f18db6bd (patch)
treeeb9ea6e2323d9f7fc52a253e1812e13116a37581 /tools/aapt/Command.cpp
parent3af8e9389e008c0076b86cc6b3c6f005e7473d10 (diff)
parente17086ba346009a26cc2299b133a0fe602acb6ec (diff)
Merge change 4828 into donut
* changes: Report densities in badging, debugging for nine patch bug.
Diffstat (limited to 'tools/aapt/Command.cpp')
-rw-r--r--tools/aapt/Command.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index dc91a48ce24e..503f66157e62 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -196,7 +196,7 @@ int doList(Bundle* bundle)
printf("\nNo resource table found.\n");
} else {
printf("\nResource table:\n");
- res.print();
+ res.print(false);
}
Asset* manifestAsset = assets.openNonAsset("AndroidManifest.xml",
@@ -380,7 +380,7 @@ int doDump(Bundle* bundle)
}
if (strcmp("resources", option) == 0) {
- res.print();
+ res.print(bundle->getValues());
} else if (strcmp("xmltree", option) == 0) {
if (bundle->getFileSpecCount() < 3) {
@@ -732,11 +732,12 @@ int doDump(Bundle* bundle)
activityIcon.string());
}
}
+
printf("locales:");
Vector<String8> locales;
res.getLocales(&locales);
- const size_t N = locales.size();
- for (size_t i=0; i<N; i++) {
+ const size_t NL = locales.size();
+ for (size_t i=0; i<NL; i++) {
const char* localeStr = locales[i].string();
if (localeStr == NULL || strlen(localeStr) == 0) {
localeStr = "--_--";
@@ -744,6 +745,24 @@ int doDump(Bundle* bundle)
printf(" '%s'", localeStr);
}
printf("\n");
+
+ Vector<ResTable_config> configs;
+ res.getConfigurations(&configs);
+ SortedVector<int> densities;
+ const size_t NC = configs.size();
+ for (size_t i=0; i<NC; i++) {
+ int dens = configs[i].density;
+ if (dens == 0) dens = 160;
+ densities.add(dens);
+ }
+
+ printf("densities:");
+ const size_t ND = densities.size();
+ for (size_t i=0; i<ND; i++) {
+ printf(" '%d'", densities[i]);
+ }
+ printf("\n");
+
AssetDir* dir = assets.openNonAssetDir(assetsCookie, "lib");
if (dir != NULL) {
if (dir->getFileCount() > 0) {