X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/e8b1d1095bd7c2b3d0fb6c0ffa3e27f8ad54a74b..2fd99183f2a64d09f193b96c6c6d56966e61b219:/AaptAssets.cpp?ds=sidebyside diff --git a/AaptAssets.cpp b/AaptAssets.cpp index 4d2d046..e4f447e 100644 --- a/AaptAssets.cpp +++ b/AaptAssets.cpp @@ -893,6 +893,11 @@ bool AaptGroupEntry::getDensityName(const char* name, return true; } + if (strcmp(name, "xhdpi") == 0) { + if (out) out->density = ResTable_config::DENSITY_MEDIUM*2; + return true; + } + char* c = (char*)name; while (*c >= '0' && *c <= '9') { c++; @@ -1825,6 +1830,16 @@ ssize_t AaptAssets::slurpResourceTree(Bundle* bundle, const String8& srcDir) continue; } + if (bundle->getMaxResVersion() != NULL && group.version.length() != 0) { + int maxResInt = atoi(bundle->getMaxResVersion()); + const char *verString = group.version.string(); + int dirVersionInt = atoi(verString + 1); // skip 'v' in version name + if (dirVersionInt > maxResInt) { + fprintf(stderr, "max res %d, skipping %s\n", maxResInt, entry->d_name); + continue; + } + } + FileType type = getFileType(subdirName.string()); if (type == kFileTypeDirectory) {