From: Ying Wang Date: Thu, 21 Jan 2010 19:12:29 +0000 (-0800) Subject: am 6f9e2c64: Merge "Find layout classes in all "layout-*" dirs." into eclair X-Git-Url: https://git.saurik.com/android/aapt.git/commitdiff_plain/241f5166e5796ba397e401727dcc7f5d78245e71?hp=195639b7fb2fd4796a560e12ddd4e8156f2a187a am 6f9e2c64: Merge "Find layout classes in all "layout-*" dirs." into eclair Merge commit '6f9e2c648c0588a2eedef2746c9750ed9c6945be' into eclair-plus-aosp * commit '6f9e2c648c0588a2eedef2746c9750ed9c6945be': Find layout classes in all "layout-*" dirs. --- diff --git a/Resource.cpp b/Resource.cpp index e2aeddf..20b0bf4 100644 --- a/Resource.cpp +++ b/Resource.cpp @@ -1831,10 +1831,16 @@ status_t writeProguardForLayouts(ProguardKeepSet* keep, const sp& assets) { status_t err; - sp layout = assets->resDir(String8("layout")); + const Vector >& dirs = assets->resDirs(); + const size_t K = dirs.size(); + for (size_t k=0; k& d = dirs.itemAt(k); + const String8& dirName = d->getLeaf(); + if ((dirName != String8("layout")) && (strncmp(dirName.string(), "layout-", 7) != 0)) { + continue; + } - if (layout != NULL) { - const KeyedVector > groups = layout->getFiles(); + const KeyedVector > groups = d->getFiles(); const size_t N = groups.size(); for (size_t i=0; i& group = groups.valueAt(i);