]> git.saurik.com Git - android/aapt.git/blobdiff - AaptAssets.cpp
Merge "Output proguard keep flags for fragment classes." into gingerbread
[android/aapt.git] / AaptAssets.cpp
index d6cfb12d0b973d053076a29e3f7c6f2f3e13a4e7..e4f447e72642670b38a82fd883f78ba9211a0482 100644 (file)
@@ -1830,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) {