AAPT2: Fix overlay support
Supports the <add-resource> tag and mimics old AAPT behavior of
not allowing new resources defined unless <add-resource> was used
or --auto-add-overlay was specified.
Change-Id: I9b461137357617ade37fd7045b418b8e6450b9c4
diff --git a/tools/aapt2/unflatten/BinaryResourceParser.cpp b/tools/aapt2/unflatten/BinaryResourceParser.cpp
index 46b5205..21e476f 100644
--- a/tools/aapt2/unflatten/BinaryResourceParser.cpp
+++ b/tools/aapt2/unflatten/BinaryResourceParser.cpp
@@ -447,6 +447,10 @@
case Public_entry::kPublic:
symbol.state = SymbolState::kPublic;
break;
+
+ case Public_entry::kUndefined:
+ symbol.state = SymbolState::kUndefined;
+ break;
}
if (!mTable->setSymbolStateAllowMangled(name, resId, symbol, mContext->getDiagnostics())) {