resolve merge conflicts of 17bd236 to stage-aosp-master

Change-Id: I08d4500aaa378b08d41e8d046c62101e08dbfba8
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index 8d734f3..9d6476a 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -263,7 +263,7 @@
 }
 
 bool ResourceTable::addResource(const ResourceNameRef& name,
-                                const ResourceId resId,
+                                const ResourceId& resId,
                                 const ConfigDescription& config,
                                 const StringPiece& product,
                                 std::unique_ptr<Value> value,
@@ -314,7 +314,7 @@
 }
 
 bool ResourceTable::addResourceAllowMangled(const ResourceNameRef& name,
-                                            const ResourceId id,
+                                            const ResourceId& id,
                                             const ConfigDescription& config,
                                             const StringPiece& product,
                                             std::unique_ptr<Value> value,
@@ -324,7 +324,7 @@
 }
 
 bool ResourceTable::addResourceImpl(const ResourceNameRef& name,
-                                    const ResourceId resId,
+                                    const ResourceId& resId,
                                     const ConfigDescription& config,
                                     const StringPiece& product,
                                     std::unique_ptr<Value> value,
@@ -415,18 +415,18 @@
     return true;
 }
 
-bool ResourceTable::setSymbolState(const ResourceNameRef& name, const ResourceId resId,
+bool ResourceTable::setSymbolState(const ResourceNameRef& name, const ResourceId& resId,
                                    const Symbol& symbol, IDiagnostics* diag) {
     return setSymbolStateImpl(name, resId, symbol, kValidNameChars, diag);
 }
 
 bool ResourceTable::setSymbolStateAllowMangled(const ResourceNameRef& name,
-                                               const ResourceId resId,
+                                               const ResourceId& resId,
                                                const Symbol& symbol, IDiagnostics* diag) {
     return setSymbolStateImpl(name, resId, symbol, kValidNameMangledChars, diag);
 }
 
-bool ResourceTable::setSymbolStateImpl(const ResourceNameRef& name, const ResourceId resId,
+bool ResourceTable::setSymbolStateImpl(const ResourceNameRef& name, const ResourceId& resId,
                                        const Symbol& symbol, const char16_t* validChars,
                                        IDiagnostics* diag) {
     assert(diag && "diagnostics can't be nullptr");