Move StringPiece to libandroidfw
libandroidfw needs to make use of StringPiece, so
move it to libandroidfw and update all code referencing
StringPiece in aapt2.
Test: make libandroidfw_tests libaapt2_tests
Change-Id: I68d7f0fc7c651b048d9d1f5e7971f10ef5349fa1
diff --git a/tools/aapt2/link/ReferenceLinker.cpp b/tools/aapt2/link/ReferenceLinker.cpp
index be787b2..ea68b61 100644
--- a/tools/aapt2/link/ReferenceLinker.cpp
+++ b/tools/aapt2/link/ReferenceLinker.cpp
@@ -30,6 +30,8 @@
#include "util/Util.h"
#include "xml/XmlUtil.h"
+using android::StringPiece;
+
namespace aapt {
namespace {
@@ -192,8 +194,7 @@
const StringPiece& alias,
const StringPiece& local_package) const override {
if (alias.empty()) {
- return xml::ExtractedPackage{local_package.ToString(),
- true /* private */};
+ return xml::ExtractedPackage{local_package.to_string(), true /* private */};
}
return {};
}