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/java/ProguardRules.h b/tools/aapt2/java/ProguardRules.h
index 744ae5b..c2d2bd9 100644
--- a/tools/aapt2/java/ProguardRules.h
+++ b/tools/aapt2/java/ProguardRules.h
@@ -31,19 +31,19 @@
class KeepSet {
public:
- inline void addClass(const Source& source, const std::u16string& className) {
+ inline void addClass(const Source& source, const std::string& className) {
mKeepSet[className].insert(source);
}
- inline void addMethod(const Source& source, const std::u16string& methodName) {
+ inline void addMethod(const Source& source, const std::string& methodName) {
mKeepMethodSet[methodName].insert(source);
}
private:
friend bool writeKeepSet(std::ostream* out, const KeepSet& keepSet);
- std::map<std::u16string, std::set<Source>> mKeepSet;
- std::map<std::u16string, std::set<Source>> mKeepMethodSet;
+ std::map<std::string, std::set<Source>> mKeepSet;
+ std::map<std::string, std::set<Source>> mKeepMethodSet;
};
bool collectProguardRulesForManifest(const Source& source, xml::XmlResource* res, KeepSet* keepSet,