AAPT2: Remove usage of u16string
For legacy reasons, we kept around the use of UTF-16 internally
in AAPT2. We don't need this and this CL removes all instances of
std::u16string and StringPiece16. The only places still needed
are when interacting with the ResTable APIs that only operate in
UTF16.
Change-Id: I492475b84bb9014fa13bf992cff447ee7a5fe588
diff --git a/tools/aapt2/compile/Pseudolocalizer.h b/tools/aapt2/compile/Pseudolocalizer.h
index 8818c17..7db88de 100644
--- a/tools/aapt2/compile/Pseudolocalizer.h
+++ b/tools/aapt2/compile/Pseudolocalizer.h
@@ -29,10 +29,10 @@
class PseudoMethodImpl {
public:
virtual ~PseudoMethodImpl() {}
- virtual std::u16string start() { return {}; }
- virtual std::u16string end() { return {}; }
- virtual std::u16string text(const StringPiece16& text) = 0;
- virtual std::u16string placeholder(const StringPiece16& text) = 0;
+ virtual std::string start() { return {}; }
+ virtual std::string end() { return {}; }
+ virtual std::string text(const StringPiece& text) = 0;
+ virtual std::string placeholder(const StringPiece& text) = 0;
};
class Pseudolocalizer {
@@ -45,9 +45,9 @@
Pseudolocalizer(Method method);
void setMethod(Method method);
- std::u16string start() { return mImpl->start(); }
- std::u16string end() { return mImpl->end(); }
- std::u16string text(const StringPiece16& text);
+ std::string start() { return mImpl->start(); }
+ std::string end() { return mImpl->end(); }
+ std::string text(const StringPiece& text);
private:
std::unique_ptr<PseudoMethodImpl> mImpl;
size_t mLastDepth;