diff options
author | Ying Wang <wangying@google.com> | 2010-01-21 11:12:29 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-01-21 11:12:29 -0800 |
commit | 6efe03b19e0734361b262f9a0be4d225088d7f9e (patch) | |
tree | 7998ce1a29b84399c003b1d7bc578c5043f270a7 /tools | |
parent | 1f2f23bd16ff798a08d73f4159ddcb621e70fc94 (diff) | |
parent | 6f9e2c648c0588a2eedef2746c9750ed9c6945be (diff) | |
download | frameworks_base-6efe03b19e0734361b262f9a0be4d225088d7f9e.zip frameworks_base-6efe03b19e0734361b262f9a0be4d225088d7f9e.tar.gz frameworks_base-6efe03b19e0734361b262f9a0be4d225088d7f9e.tar.bz2 |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aapt/Resource.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index e2aeddf..20b0bf4 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -1831,10 +1831,16 @@ status_t writeProguardForLayouts(ProguardKeepSet* keep, const sp<AaptAssets>& assets) { status_t err; - sp<AaptDir> layout = assets->resDir(String8("layout")); + const Vector<sp<AaptDir> >& dirs = assets->resDirs(); + const size_t K = dirs.size(); + for (size_t k=0; k<K; k++) { + const sp<AaptDir>& 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<String8,sp<AaptGroup> > groups = layout->getFiles(); + const KeyedVector<String8,sp<AaptGroup> > groups = d->getFiles(); const size_t N = groups.size(); for (size_t i=0; i<N; i++) { const sp<AaptGroup>& group = groups.valueAt(i); |