Home
last modified time | relevance | path

Searched refs:file_ref (Results 1 – 9 of 9) sorted by relevance

/frameworks/base/tools/aapt2/optimize/
DResourcePathShortener.cpp85 FileReference* file_ref = ValueCast<FileReference>(config_value->value.get()); in Consume() local
86 if (file_ref) { in Consume()
87 file_refs.insert(file_ref); in Consume()
94 for (auto& file_ref : file_refs) { in Consume() local
96 util::ExtractResFilePathParts(*file_ref->path, &res_subdir, &actual_filename, &extension); in Consume()
98 std::string shortened_filename = ShortenFileName(*file_ref->path, num_chars); in Consume()
106 path_map_.insert({*file_ref->path, shortened_path}); in Consume()
107 file_ref->path = table->string_pool.MakeRef(shortened_path, file_ref->path.GetContext()); in Consume()
/frameworks/base/tools/aapt2/link/
DTableMerger.cpp316 const std::string& package, const FileReference& file_ref) { in CloneAndMangleFile() argument
318 if (util::ExtractResFilePathParts(*file_ref.path, &prefix, &entry, &suffix)) { in CloneAndMangleFile()
323 new_file_ref->SetComment(file_ref.GetComment()); in CloneAndMangleFile()
324 new_file_ref->SetSource(file_ref.GetSource()); in CloneAndMangleFile()
325 new_file_ref->type = file_ref.type; in CloneAndMangleFile()
326 new_file_ref->file = file_ref.file; in CloneAndMangleFile()
329 return std::unique_ptr<FileReference>(file_ref.Clone(&master_table_->string_pool)); in CloneAndMangleFile()
335 std::unique_ptr<FileReference> file_ref = in MergeFile() local
337 file_ref->SetSource(file_desc.source); in MergeFile()
338 file_ref->type = file_desc.type; in MergeFile()
[all …]
/frameworks/base/tools/aapt2/cmd/
DOptimize.cpp245 auto* file_ref = ValueCast<FileReference>(config_value->value.get()); in WriteSplitApk() local
246 if (file_ref == nullptr) { in WriteSplitApk()
250 if (file_ref->file == nullptr) { in WriteSplitApk()
252 context_->GetDiagnostics()->Warn(DiagMessage(file_ref->GetSource()) in WriteSplitApk()
259 config_sorted_files[std::make_pair(config_value->config, entry_name)] = file_ref; in WriteSplitApk()
264 FileReference* file_ref = entry.second; in WriteSplitApk() local
265 if (!io::CopyFileToArchivePreserveCompression(context_, file_ref->file, *file_ref->path, in WriteSplitApk()
DLink.cpp516 FileReference* file_ref = ValueCast<FileReference>(config_value->value.get()); in Flatten() local
517 if (!file_ref) { in Flatten()
521 io::IFile* file = file_ref->file; in Flatten()
523 context_->GetDiagnostics()->Error(DiagMessage(file_ref->GetSource()) in Flatten()
530 file_op.dst_path = *file_ref->path; in Flatten()
535 (file_ref->type == ResourceFile::Type::kBinaryXml || in Flatten()
536 file_ref->type == ResourceFile::Type::kProtoXml)) { in Flatten()
544 if (file_ref->type == ResourceFile::Type::kProtoXml) { in Flatten()
570 file_ref->type = XmlFileTypeForOutputFormat(options_.output_format); in Flatten()
573 file_op.xml_to_flatten->file.source = file_ref->GetSource(); in Flatten()
[all …]
/frameworks/base/tools/aapt2/test/
DBuilders.cpp92 auto file_ref = util::make_unique<FileReference>(table_->string_pool.MakeRef(path)); in AddFileReference() local
93 file_ref->file = file; in AddFileReference()
94 return AddValue(name, id, std::move(file_ref)); in AddFileReference()
101 auto file_ref = util::make_unique<FileReference>(table_->string_pool.MakeRef(path)); in AddFileReference() local
102 file_ref->file = file; in AddFileReference()
103 return AddValue(name, config, {}, std::move(file_ref)); in AddFileReference()
/frameworks/base/tools/aapt2/format/binary/
DBinaryResourceParser.cpp521 FileReference* file_ref = ValueCast<FileReference>(item.get()); in ParseValue() local
522 if (file_ref != nullptr) { in ParseValue()
523 file_ref->file = files_->FindFile(*file_ref->path); in ParseValue()
524 if (file_ref->file == nullptr) { in ParseValue()
526 << "' is a file reference to '" << *file_ref->path in ParseValue()
/frameworks/base/tools/aapt2/
DResourceUtils.cpp762 std::unique_ptr<FileReference> file_ref = in ParseBinaryResValue() local
766 file_ref->type = ResourceFile::Type::kUnknown; in ParseBinaryResValue()
767 } else if (util::EndsWith(*file_ref->path, ".xml")) { in ParseBinaryResValue()
768 file_ref->type = ResourceFile::Type::kBinaryXml; in ParseBinaryResValue()
769 } else if (util::EndsWith(*file_ref->path, ".png")) { in ParseBinaryResValue()
770 file_ref->type = ResourceFile::Type::kPng; in ParseBinaryResValue()
772 return std::move(file_ref); in ParseBinaryResValue()
DLoadedApk.cpp212 FileReference* file_ref = ValueCast<FileReference>(config_value->value.get()); in WriteToArchive() local
213 if (file_ref) { in WriteToArchive()
214 referenced_resources.insert(*file_ref->path); in WriteToArchive()
/frameworks/base/tools/aapt2/format/proto/
DProtoDeserialize.cpp923 std::unique_ptr<FileReference> file_ref = in DeserializeItemFromPb() local
926 file_ref->type = DeserializeFileReferenceTypeFromPb(pb_file.type()); in DeserializeItemFromPb()
928 file_ref->file = files->FindFile(*file_ref->path); in DeserializeItemFromPb()
930 return std::move(file_ref); in DeserializeItemFromPb()