Home
last modified time | relevance | path

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

/frameworks/base/tools/aapt2/optimize/
DResourcePathShortener.cpp92 FileReference* file_ref = ValueCast<FileReference>(config_value->value.get()); in Consume() local
93 if (file_ref) { in Consume()
94 file_refs.insert(file_ref); in Consume()
101 for (auto& file_ref : file_refs) { in Consume() local
103 util::ExtractResFilePathParts(*file_ref->path, &res_subdir, &actual_filename, &extension); in Consume()
109 std::string shortened_filename = ShortenFileName(*file_ref->path, num_chars); in Consume()
117 path_map_.insert({*file_ref->path, shortened_path}); in Consume()
118 file_ref->path = table->string_pool.MakeRef(shortened_path, file_ref->path.GetContext()); in Consume()
/frameworks/base/tools/aapt2/link/
DTableMerger.cpp324 const std::string& package, const FileReference& file_ref) { in CloneAndMangleFile() argument
326 if (util::ExtractResFilePathParts(*file_ref.path, &prefix, &entry, &suffix)) { in CloneAndMangleFile()
331 new_file_ref->SetComment(file_ref.GetComment()); in CloneAndMangleFile()
332 new_file_ref->SetSource(file_ref.GetSource()); in CloneAndMangleFile()
333 new_file_ref->type = file_ref.type; in CloneAndMangleFile()
334 new_file_ref->file = file_ref.file; in CloneAndMangleFile()
339 return std::unique_ptr<FileReference>(file_ref.Transform(cloner)); in CloneAndMangleFile()
345 std::unique_ptr<FileReference> file_ref = in MergeFile() local
347 file_ref->SetSource(file_desc.source); in MergeFile()
348 file_ref->type = file_desc.type; in MergeFile()
[all …]
/frameworks/base/tools/aapt2/cmd/
DOptimize.cpp251 auto* file_ref = ValueCast<FileReference>(config_value->value.get()); in WriteSplitApk() local
252 if (file_ref == nullptr) { in WriteSplitApk()
256 if (file_ref->file == nullptr) { in WriteSplitApk()
258 context_->GetDiagnostics()->Warn(DiagMessage(file_ref->GetSource()) in WriteSplitApk()
265 config_sorted_files[std::make_pair(config_value->config, entry_name)] = file_ref; in WriteSplitApk()
270 FileReference* file_ref = entry.second; in WriteSplitApk() local
271 if (!io::CopyFileToArchivePreserveCompression(context_, file_ref->file, *file_ref->path, in WriteSplitApk()
DLink.cpp541 FileReference* file_ref = ValueCast<FileReference>(config_value->value.get()); in Flatten() local
542 if (!file_ref) { in Flatten()
546 io::IFile* file = file_ref->file; in Flatten()
548 context_->GetDiagnostics()->Error(DiagMessage(file_ref->GetSource()) in Flatten()
555 file_op.dst_path = *file_ref->path; in Flatten()
560 (file_ref->type == ResourceFile::Type::kBinaryXml || in Flatten()
561 file_ref->type == ResourceFile::Type::kProtoXml)) { in Flatten()
569 if (file_ref->type == ResourceFile::Type::kProtoXml) { in Flatten()
595 file_ref->type = XmlFileTypeForOutputFormat(options_.output_format); in Flatten()
598 file_op.xml_to_flatten->file.source = file_ref->GetSource(); in Flatten()
[all …]
/frameworks/base/tools/aapt2/test/
DBuilders.cpp85 auto file_ref = util::make_unique<FileReference>(table_->string_pool.MakeRef(path)); in AddFileReference() local
86 file_ref->file = file; in AddFileReference()
87 return AddValue(name, id, std::move(file_ref)); in AddFileReference()
94 auto file_ref = util::make_unique<FileReference>(table_->string_pool.MakeRef(path)); in AddFileReference() local
95 file_ref->file = file; in AddFileReference()
96 return AddValue(name, config, {}, std::move(file_ref)); in AddFileReference()
/frameworks/base/tools/aapt2/format/binary/
DBinaryResourceParser.cpp562 FileReference* file_ref = ValueCast<FileReference>(item.get()); in ParseValue() local
563 if (file_ref != nullptr) { in ParseValue()
564 file_ref->file = files_->FindFile(*file_ref->path); in ParseValue()
565 if (file_ref->file == nullptr) { in ParseValue()
567 << "' is a file reference to '" << *file_ref->path in ParseValue()
/frameworks/base/tools/aapt2/
DResourceUtils.cpp772 std::unique_ptr<FileReference> file_ref = in ParseBinaryResValue() local
776 file_ref->type = ResourceFile::Type::kUnknown; in ParseBinaryResValue()
777 } else if (util::EndsWith(*file_ref->path, ".xml")) { in ParseBinaryResValue()
778 file_ref->type = ResourceFile::Type::kBinaryXml; in ParseBinaryResValue()
779 } else if (util::EndsWith(*file_ref->path, ".png")) { in ParseBinaryResValue()
780 file_ref->type = ResourceFile::Type::kPng; in ParseBinaryResValue()
782 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.cpp983 std::unique_ptr<FileReference> file_ref = in DeserializeItemFromPb() local
986 file_ref->type = DeserializeFileReferenceTypeFromPb(pb_file.type()); in DeserializeItemFromPb()
988 file_ref->file = files->FindFile(*file_ref->path); in DeserializeItemFromPb()
990 return std::move(file_ref); in DeserializeItemFromPb()