X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/b935e64360db2f6f0159b879a810ad4428c87ce9..26bee7e6258deed92e270ab95d7de54cc55edb85:/AaptAssets.cpp 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) {