]> git.saurik.com Git - android/aapt.git/blobdiff - AaptAssets.cpp
am bcf2adeb: Merge "aapt: Allow raw "%" in unformatted string-arrays"
[android/aapt.git] / AaptAssets.cpp
index d6cfb12d0b973d053076a29e3f7c6f2f3e13a4e7..e4f447e72642670b38a82fd883f78ba9211a0482 100644 (file)
@@ -1830,6 +1830,16 @@ ssize_t AaptAssets::slurpResourceTree(Bundle* bundle, const String8& srcDir)
             continue;
         }
 
             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) {
         FileType type = getFileType(subdirName.string());
 
         if (type == kFileTypeDirectory) {