/frameworks/base/tools/aapt2/ |
H A D | ResourceParser_test.cpp | 50 ::testing::AssertionResult testParse(const StringPiece& str) { argument 51 return testParse(str, ConfigDescription{}); 54 ::testing::AssertionResult testParse(const StringPiece& str, const ConfigDescription& config) { argument 56 input << "<resources>\n" << str << "\n</resources>" << std::endl; 72 String* str = test::getValue<String>(&mTable, u"@string/foo"); local 73 ASSERT_NE(nullptr, str); 74 EXPECT_EQ(std::u16string(u" hey there "), *str->value); 81 String* str = test::getValue<String>(&mTable, u"@string/foo"); local 82 ASSERT_NE(nullptr, str); 83 EXPECT_EQ(std::u16string(u"?123"), *str 100 String* str = test::getValue<String>(&mTable, u"@string/foo"); local [all...] |
H A D | ResourceUtils.cpp | 29 bool extractResourceName(const StringPiece16& str, StringPiece16* outPackage, argument 33 const char16_t* start = str.data(); 34 const char16_t* end = start + str.size(); 53 bool parseResourceName(const StringPiece16& str, ResourceNameRef* outRef, bool* outPrivate) { argument 54 if (str.empty()) { 60 if (str.data()[0] == u'*') { 68 if (!extractResourceName(str.substr(offset, str.size() - offset), &package, &type, &entry)) { 93 bool tryParseReference(const StringPiece16& str, ResourceNameRef* outRef, bool* outCreate, argument 95 StringPiece16 trimmedStr(util::trimWhitespace(str)); 139 isReference(const StringPiece16& str) argument 143 tryParseAttributeReference(const StringPiece16& str, ResourceNameRef* outRef) argument 176 isAttributeReference(const StringPiece16& str) argument 188 parseStyleParentReference(const StringPiece16& str, std::string* outError) argument 227 err << "invalid parent reference '" << str << "'"; local 237 tryParseReference(const StringPiece16& str, bool* outCreate) argument 255 tryParseNullOrEmpty(const StringPiece16& str) argument 272 tryParseEnumSymbol(const Attribute* enumAttr, const StringPiece16& str) argument 289 tryParseFlagSymbol(const Attribute* flagAttr, const StringPiece16& str) argument 335 tryParseColor(const StringPiece16& str) argument 389 tryParseBool(const StringPiece16& str, bool* outValue) argument 405 tryParseBool(const StringPiece16& str) argument 421 tryParseInt(const StringPiece16& str) argument 429 tryParseFloat(const StringPiece16& str) argument 535 parseItemForAttribute( const StringPiece16& str, const Attribute* attr, std::function<void(const ResourceName&)> onCreateReference) argument [all...] |
H A D | ResourceUtils.h | 40 bool extractResourceName(const StringPiece16& str, StringPiece16* outPackage, 48 bool parseResourceName(const StringPiece16& str, ResourceNameRef* outResource, 58 bool tryParseReference(const StringPiece16& str, ResourceNameRef* outReference, 64 bool isReference(const StringPiece16& str); 70 bool tryParseAttributeReference(const StringPiece16& str, ResourceNameRef* outReference); 75 bool isAttributeReference(const StringPiece16& str); 80 bool tryParseBool(const StringPiece16& str, bool* outValue); 83 * Returns a Reference, or None Maybe instance if the string `str` was parsed as a 91 Maybe<Reference> parseStyleParentReference(const StringPiece16& str, std::string* outError); 98 std::unique_ptr<Reference> tryParseReference(const StringPiece16& str, boo [all...] |
H A D | ResourceValues.cpp | 137 String* str = new String(newPool->makeRef(*value)); local 138 str->mComment = mComment; 139 str->mSource = mSource; 140 return str; 169 StyledString* str = new StyledString(newPool->makeRef(value)); local 170 str->mComment = mComment; 171 str->mSource = mSource; 172 return str; 176 *out << "(styled string) \"" << *value->str << "\"";
|
H A D | ResourceValues.h | 79 void setComment(const StringPiece16& str) { argument 80 mComment = str.toString(); 83 void setComment(std::u16string&& str) { argument 84 mComment = std::move(str);
|
H A D | StringPool.cpp | 120 return mEntry->str.getIndex(); 124 return mEntry->str.getContext(); 127 StringPool::Ref StringPool::makeRef(const StringPiece16& str) { argument 128 return makeRefImpl(str, Context{}, true); 131 StringPool::Ref StringPool::makeRef(const StringPiece16& str, const Context& context) { argument 132 return makeRefImpl(str, context, true); 135 StringPool::Ref StringPool::makeRefImpl(const StringPiece16& str, const Context& context, argument 138 auto iter = mIndexedStrings.find(str); 145 entry->value = str.toString(); 154 StringPool::StyleRef StringPool::makeRef(const StyleString& str) { argument 158 makeRef(const StyleString& str, const Context& context) argument [all...] |
H A D | StringPool.h | 39 std::u16string str; member in struct:aapt::StyleString 117 Ref str; member in class:aapt::StringPool::StyleEntry 139 Ref makeRef(const StringPiece16& str); 146 Ref makeRef(const StringPiece16& str, const Context& context); 151 StyleRef makeRef(const StyleString& str); 158 StyleRef makeRef(const StyleString& str, const Context& context); 198 Ref makeRefImpl(const StringPiece16& str, const Context& context, bool unique);
|
H A D | StringPool_test.cpp | 97 EXPECT_EQ(*(ref2->str), u"a"); 111 EXPECT_EQ(*(ref2->str), u"a"); 141 StyleString str { 148 StringPool::StyleRef ref = pool.makeRef(str); 151 EXPECT_EQ(std::u16string(u"android"), *(ref->str)); 165 StyleString str { { u"android" } }; 166 StringPool::StyleRef styleRef = pool.makeRef(str); 195 const char16_t* str = test.stringAt(0, &len); local 197 EXPECT_EQ(u'\u093f', *str); 198 EXPECT_EQ(0u, str[ [all...] |
/frameworks/base/tools/aapt2/compile/ |
H A D | Compile.cpp | 50 // Original config str. We keep this because when we parse the config, we may add on 81 *outError = errStr.str(); 126 return name.str();
|
H A D | Png.cpp | 1186 *outError = err.str();
|
H A D | PseudolocaleGenerator.cpp | 32 const StringPiece16 originalText = *string->value->str; 87 localized.str += localizer.start(); 98 *ranges[i].updateStart = localized.str.size(); 102 *ranges[i].updateEnd = localized.str.size(); 105 localized.str += localizer.text(originalText.substr(start, len)); 108 localized.str += localizer.end();
|
H A D | PseudolocaleGenerator_test.cpp | 31 originalStyle.str = u"Hello world!"; 38 EXPECT_EQ(originalStyle.str, *newString->value->str); 59 EXPECT_EQ(std::u16string(u"[Ĥéļļö ŵöŕļð¡ one two]"), *newString->value->str);
|
H A D | Pseudolocalizer.cpp | 87 const char16_t* str = text.data(); local 90 char16_t c = str[pos]; 117 } else if (str[lastpos] == k_arg_start && str[nextpos - 1] == k_arg_end) {
|
/frameworks/base/tools/aapt2/flatten/ |
H A D | XmlFlattener.cpp | 59 void addString(const StringPiece16& str, uint32_t priority, android::ResStringPool_ref* dest) { argument 60 if (!str.empty()) { 62 mPool.makeRef(str, StringPool::Context{ priority }), 287 for (const auto& str : visitor.mPool) { 288 ResourceId id = { str->context.priority };
|
/frameworks/base/tools/aapt2/java/ |
H A D | AnnotationProcessor.cpp | 77 std::string result = mComment.str();
|
H A D | AnnotationProcessor_test.cpp | 32 std::string annotations = result.str(); 43 std::string annotations = result.str();
|
H A D | JavaClassGenerator.cpp | 171 processor->appendComment(line.str()); 331 styleableArrayDef->getCommentBuilder()->appendComment(styleableComment.str()); 390 attrProcessor->appendComment(defaultComment.str()); 400 attrProcessor->appendComment(doclavaName.str()); 440 mError = err.str();
|
H A D | JavaClassGenerator_test.cpp | 63 std::string output = out.str(); 90 std::string output = out.str(); 112 std::string output = out.str(); 139 std::string output = out.str(); 150 std::string output = out.str(); 161 std::string output = out.str(); 188 std::string output = out.str(); 192 out.str(""); 194 output = out.str(); 223 std::string output = out.str(); [all...] |
H A D | ManifestClassGenerator_test.cpp | 38 *outStr = out.str();
|
/frameworks/base/tools/aapt2/link/ |
H A D | Link.cpp | 305 uint32_t getCompressionFlags(const StringPiece& str); 315 uint32_t ResourceFileFlattener::getCompressionFlags(const StringPiece& str) { argument 321 if (util::stringEndsWith<char>(str, extension)) {
|
H A D | ManifestFixer_test.cpp | 48 .addSymbol(u"@android:string/str", ResourceId(0x01060000)) 53 std::unique_ptr<xml::XmlResource> verify(const StringPiece& str) { argument 54 return verifyWithOptions(str, {}); 57 std::unique_ptr<xml::XmlResource> verifyWithOptions(const StringPiece& str, argument 59 std::unique_ptr<xml::XmlResource> doc = test::buildXmlDom(str); 82 EXPECT_EQ(nullptr, verify("<manifest package=\"@string/str\" />"));
|
H A D | ReferenceLinker.cpp | 149 mStringPool->makeRef(stringBuilder.str()));
|
/frameworks/base/tools/aapt2/proto/ |
H A D | TableProtoDeserializer.cpp | 181 const uint32_t idx = pbItem.str().idx(); 182 StringPiece16 str = util::getString(*mValuePool, idx); local 186 StyleString styleStr = { str.toString() }; 199 pool->makeRef(str, StringPool::Context{ 1, config })); 203 StringPiece16 str = util::getString(*mValuePool, idx); local 205 pool->makeRef(str, StringPool::Context{ 1, config })); 209 StringPiece16 str = util::getString(*mValuePool, idx); local 211 pool->makeRef(str, StringPool::Context{ 0, config }));
|
H A D | TableProtoSerializer.cpp | 53 void visit(String* str) override { 54 getPbItem()->mutable_str()->set_idx(str->value.getIndex()); 57 void visit(StyledString* str) override { 58 getPbItem()->mutable_str()->set_idx(str->value.getIndex());
|
/frameworks/base/tools/aapt2/test/ |
H A D | Builders.h | 62 ResourceTableBuilder& addString(const StringPiece16& name, const StringPiece16& str) { argument 63 return addString(name, {}, str); 67 const StringPiece16& str) { 68 return addValue(name, id, util::make_unique<String>(mTable->stringPool.makeRef(str))); 72 const ConfigDescription& config, const StringPiece16& str) { 74 util::make_unique<String>(mTable->stringPool.makeRef(str))); 159 ValueBuilder& setComment(const StringPiece16& str) { argument 160 mValue->setComment(str); 200 StyleBuilder& setParent(const StringPiece16& str) { argument 201 mStyle->parent = Reference(parseNameOrDie(str)); 66 addString(const StringPiece16& name, const ResourceId id, const StringPiece16& str) argument 71 addString(const StringPiece16& name, const ResourceId id, const ConfigDescription& config, const StringPiece16& str) argument 205 addItem(const StringPiece16& str, std::unique_ptr<Item> value) argument 210 addItem(const StringPiece16& str, ResourceId id, std::unique_ptr<Item> value) argument 226 addItem(const StringPiece16& str, Maybe<ResourceId> id = {}) argument 237 buildXmlDom(const StringPiece& str) argument 239 in << "<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>\\n" << str; local 246 buildXmlDomForPackageName(IAaptContext* context, const StringPiece& str) argument [all...] |