summaryrefslogtreecommitdiffstats
path: root/tools/aapt/AaptAssets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt/AaptAssets.cpp')
-rw-r--r--tools/aapt/AaptAssets.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index dbcef6d..b00d8b0 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -1819,6 +1819,19 @@ void AaptAssets::print() const
AaptDir::print();
}
+sp<AaptDir> AaptAssets::resDir(const String8& name)
+{
+ const Vector<sp<AaptDir> >& dirs = mDirs;
+ const size_t N = dirs.size();
+ for (size_t i=0; i<N; i++) {
+ const sp<AaptDir>& d = dirs.itemAt(i);
+ if (d->getLeaf() == name) {
+ return d;
+ }
+ }
+ return NULL;
+}
+
bool
valid_symbol_name(const String8& symbol)
{