Home
last modified time | relevance | path

Searched refs:DiagMessage (Results 1 – 25 of 43) sorted by relevance

12

/frameworks/base/tools/aapt2/
DDiagnostics.h37 struct DiagMessage { struct
39 DiagMessage() = default;
41 explicit DiagMessage(const android::StringPiece& src) : source_(src) {} in DiagMessage() function
43 explicit DiagMessage(const Source& src) : source_(src) {} in DiagMessage() argument
45 explicit DiagMessage(size_t line) : source_(Source().WithLine(line)) {} in DiagMessage() function
48 DiagMessage& operator<<(const T& value) {
63 inline DiagMessage& DiagMessage::operator<<(const ::std::u16string& value) { argument
75 virtual void Error(const DiagMessage& message) { in Error()
80 virtual void Warn(const DiagMessage& message) { in Warn()
85 virtual void Note(const DiagMessage& message) { in Note()
DLoadedApk.cpp80 diag->Error(DiagMessage(path) << "failed opening zip: " << error); in LoadApkFromPath()
91 diag->Error(DiagMessage(path) << "could not identify format of APK"); in LoadApkFromPath()
105 diag->Error(DiagMessage(source) << "failed to open " << kProtoResourceTablePath); in LoadProtoApkFromFileCollection()
111 diag->Error(DiagMessage(source) << "failed to read " << kProtoResourceTablePath); in LoadProtoApkFromFileCollection()
118 diag->Error(DiagMessage(source) in LoadProtoApkFromFileCollection()
126 diag->Error(DiagMessage(source) << "failed to find " << kAndroidManifestPath); in LoadProtoApkFromFileCollection()
132 diag->Error(DiagMessage(source) << "failed to open " << kAndroidManifestPath); in LoadProtoApkFromFileCollection()
139 diag->Error(DiagMessage(source) << "failed to read proto " << kAndroidManifestPath); in LoadProtoApkFromFileCollection()
146 diag->Error(DiagMessage(source) in LoadProtoApkFromFileCollection()
163 diag->Error(DiagMessage(source) << "failed to open " << kApkResourceTablePath); in LoadBinaryApkFromFileCollection()
[all …]
DResourceParser.cpp312 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) in FlattenXmlSubtree()
327 diag_->Warn(DiagMessage(source_.WithLine(parser->line_number())) in FlattenXmlSubtree()
387 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) << builder.GetError()); in FlattenXmlSubtree()
409 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) in Parse()
419 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) in Parse()
441 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) in ParseResources()
490 diag_->Error(DiagMessage(source_) << "resource '" << stripped_resource in ParseResources()
566 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) in ParseResource()
577 diag_->Error(DiagMessage(out_resource->source) in ParseResource()
590 diag_->Error(DiagMessage(source_.WithLine(parser->line_number())) in ParseResource()
[all …]
/frameworks/base/tools/aapt2/optimize/
DMultiApkGenerator.cpp146 context_->GetDiagnostics()->Note(DiagMessage(artifact.name) << "skipping artifact"); in FromBaseApk()
165 diag->Error(DiagMessage() << "could not update AndroidManifest.xml for output artifact"); in FromBaseApk()
171 diag->Warn(DiagMessage() << "could not create out dir: " << out); in FromBaseApk()
176 diag->Note(DiagMessage() << "Generating split: " << out); in FromBaseApk()
182 diag->Note(DiagMessage() << "Writing output: " << out); in FromBaseApk()
196 DiagMessage() << "The configuration and command line to filter artifacts do not match"); in FromBaseApk()
198 context_->GetDiagnostics()->Error(DiagMessage() << kept_artifacts.size() << " kept:"); in FromBaseApk()
200 context_->GetDiagnostics()->Error(DiagMessage() << " " << artifact); in FromBaseApk()
203 context_->GetDiagnostics()->Error(DiagMessage() << filtered_artifacts.size() << " filtered:"); in FromBaseApk()
205 context_->GetDiagnostics()->Error(DiagMessage() << " " << artifact); in FromBaseApk()
[all …]
/frameworks/base/tools/aapt2/format/binary/
DBinaryResourceParser.cpp99 diag_->Error(DiagMessage(source_) << "corrupt resources.arsc: " << parser.error()); in Parse()
104 diag_->Error(DiagMessage(source_) << StringPrintf("unknown chunk of type 0x%02x", in Parse()
115 diag_->Warn(DiagMessage(source_) in Parse()
118 diag_->Warn(DiagMessage(source_) in Parse()
130 diag_->Error(DiagMessage(source_) << "corrupt ResTable_header chunk"); in ParseTable()
143 diag_->Error(DiagMessage(source_) in ParseTable()
151 diag_->Warn(DiagMessage(source_) << "unexpected string pool in ResTable"); in ParseTable()
162 diag_->Warn(DiagMessage(source_) in ParseTable()
170 diag_->Error(DiagMessage(source_) << "corrupt resource table: " << parser.error()); in ParseTable()
181 diag_->Error(DiagMessage(source_) << "corrupt ResTable_package chunk"); in ParsePackage()
[all …]
/frameworks/base/tools/aapt2/cmd/
DCompile.cpp158 context->GetDiagnostics()->Error(DiagMessage(path_data.source) in CompileTable()
195 context->GetDiagnostics()->Error(DiagMessage(output_path) << "failed to open"); in CompileTable()
208 context->GetDiagnostics()->Error(DiagMessage(output_path) << "failed to write"); in CompileTable()
214 context->GetDiagnostics()->Error(DiagMessage(output_path) << "failed to finish entry"); in CompileTable()
222 context->GetDiagnostics()->Error(DiagMessage() in CompileTable()
290 diag->Error(DiagMessage(output_path) << "failed to open file"); in WriteHeaderAndDataToWriter()
304 diag->Error(DiagMessage(output_path) << "failed to write entry data"); in WriteHeaderAndDataToWriter()
310 diag->Error(DiagMessage(output_path) << "failed to finish writing data"); in WriteHeaderAndDataToWriter()
328 diag->Error(DiagMessage(output_path) << "failed to write entry data"); in FlattenXmlToOutStream()
338 context->GetDiagnostics()->Error(DiagMessage(input_path) in IsValidFile()
[all …]
DLink.cpp219 context_->GetDiagnostics()->Error(DiagMessage() << "Failed to rewrite " << name in FindByName()
225 context_->GetDiagnostics()->Note(DiagMessage() << "rewriting " << name << " (" << *id in FindByName()
246 context->GetDiagnostics()->Note(DiagMessage(path) << "writing to archive (keep_raw_values=" in FlattenXml()
285 diag->Error(DiagMessage(path) << "failed to load XML file: " << fin.GetError()); in LoadXml()
457 context_->GetDiagnostics()->Note(DiagMessage() in LinkAndVersionXmlFile()
548 context_->GetDiagnostics()->Error(DiagMessage(file_ref->GetSource()) in Flatten()
564 context_->GetDiagnostics()->Error(DiagMessage(file->GetSource()) in Flatten()
572 context_->GetDiagnostics()->Error(DiagMessage(file->GetSource()) in Flatten()
580 context_->GetDiagnostics()->Error(DiagMessage(file->GetSource()) in Flatten()
588 context_->GetDiagnostics()->Error(DiagMessage(file->GetSource()) in Flatten()
[all …]
DDump.cpp141 diag_->Error(DiagMessage() << "No dump container specified"); in Action()
149 context.GetDiagnostics()->Error(DiagMessage(container) in Action()
158 context.GetDiagnostics()->Error(DiagMessage(container) in Action()
173 context.GetDiagnostics()->Error(DiagMessage(container) in Action()
182 context.GetDiagnostics()->Error(DiagMessage(container) in Action()
197 context.GetDiagnostics()->Error(DiagMessage(container) in Action()
206 context.GetDiagnostics()->Warn(DiagMessage(container) in Action()
231 GetDiagnostics()->Error(DiagMessage() << "Failed to retrieve resource table"); in Dump()
272 GetDiagnostics()->Error(DiagMessage() << "Failed to retrieve resource table"); in Dump()
295 GetDiagnostics()->Error(DiagMessage() << "Failed to retrieve resource table"); in Dump()
[all …]
DConvert.cpp99 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
107 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
115 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
123 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
131 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
170 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
178 context_->GetDiagnostics()->Error(DiagMessage(source_) << "failed to parse binary XML: " in SerializeFile()
185 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
193 context_->GetDiagnostics()->Error(DiagMessage(source_) in SerializeFile()
273 context->GetDiagnostics()->Error(DiagMessage(apk->GetSource()) in Convert()
[all …]
DOptimize.cpp133 context_->GetDiagnostics()->Note(DiagMessage() << "Optimizing APK..."); in Run()
138 context_->GetDiagnostics()->Error(DiagMessage() << "failed filtering resources"); in Run()
150 context_->GetDiagnostics()->Error(DiagMessage() << "failed deduping resources"); in Run()
157 context_->GetDiagnostics()->Error(DiagMessage() << "failed shortening resource paths"); in Run()
163 context_->GetDiagnostics()->Error(DiagMessage() in Run()
187 DiagMessage(*path_iter) << "generating split with configurations '" in Run()
258 context_->GetDiagnostics()->Warn(DiagMessage(file_ref->GetSource()) in WriteSplitApk()
314 context->GetDiagnostics()->Error(DiagMessage(line) << "No # found in line"); in ParseConfig()
321 context->GetDiagnostics()->Error(DiagMessage(line) << "Malformed resource name"); in ParseConfig()
325 context->GetDiagnostics()->Error(DiagMessage(line) in ParseConfig()
[all …]
DUtil.cpp41 diag->Error(DiagMessage() << "invalid density '" << arg << "' for --preferred-density option"); in ParseTargetDensityParameter()
50 diag->Error(DiagMessage() << "invalid preferred density '" << arg << "'. " in ParseTargetDensityParameter()
71 diag->Error(DiagMessage() << "invalid split parameter '" << arg << "'"); in ParseSplitParameter()
72 diag->Note(DiagMessage() << "should be --split path/to/output.apk" << sSeparator in ParseSplitParameter()
82 diag->Error(DiagMessage() << "invalid config '" << config_str << "' in split parameter '" in ParseSplitParameter()
101 diag->Error(DiagMessage() << "invalid config '" << config_str << "' for -c option"); in ParseConfigFilterParameters()
106 diag->Warn(DiagMessage() << "ignoring density '" << config << "' for -c option"); in ParseConfigFilterParameters()
344 diag->Error(DiagMessage(xml_res.file.source) << "root tag must be <manifest>"); in ExtractAppInfoFromBinaryManifest()
350 diag->Error(DiagMessage(xml_res.file.source) << "<manifest> must have a 'package' attribute"); in ExtractAppInfoFromBinaryManifest()
357 diag->Error(DiagMessage(xml_res.file.source.WithLine(manifest_el->line_number)) in ExtractAppInfoFromBinaryManifest()
[all …]
DDump.h49 GetDiagnostics()->Error(DiagMessage() << "No AndroidManifest."); in GetPackageName()
55 GetDiagnostics()->Error(DiagMessage() << "No package name."); in GetPackageName()
66 diag_->Error(DiagMessage() << "No dump apk specified."); in Action()
274 diag_->Error(DiagMessage() << "no subcommand specified"); in Action()
276 diag_->Error(DiagMessage() << "unknown subcommand '" << args[0] << "'"); in Action()
/frameworks/base/tools/aapt2/configuration/
DConfigurationParser.cpp110 diag->Error(DiagMessage() << "No label found for element " << element->name); in GetLabel()
120 diag->Error(DiagMessage() << "No version-code-order found for element '" << element->name in GetVersionCodeOrder()
170 diag->Error(DiagMessage() << "Missing placeholder for artifact: " << placeholder); in ReplacePlaceholder()
180 diag->Error(DiagMessage() << "Placeholder present but no value for artifact: " << placeholder); in ReplacePlaceholder()
188 diag->Error(DiagMessage() << "Placeholder present multiple times: " << placeholder); in ReplacePlaceholder()
216 DiagMessage() << "Artifact does not have a name and no global name template defined"); in ToOutputArtifact()
225 diag->Error(DiagMessage() << "Could not determine split APK artifact name"); in ToOutputArtifact()
236 src_diag.Error(DiagMessage() << "Could not lookup required ABIs: " in ToOutputArtifact()
242 src_diag.Error(DiagMessage() << "Could not lookup required locales: " in ToOutputArtifact()
249 src_diag.Error(DiagMessage() << "Could not lookup required screen densities: " in ToOutputArtifact()
[all …]
/frameworks/base/tools/aapt2/link/
DManifestFixer.cpp36 diag->Error(DiagMessage(el->line_number) in RequiredNameIsNotEmpty()
42 diag->Error(DiagMessage(el->line_number) in RequiredNameIsNotEmpty()
63 diag->Error(DiagMessage(el->line_number) in NameIsJavaClassName()
81 diag->Error(DiagMessage(el->line_number) in RequiredNameIsJavaClassName()
91 diag->Error(DiagMessage(el->line_number) in RequiredNameIsJavaPackage()
97 diag->Error(DiagMessage(el->line_number) << "attribute 'android:name' in <" << el->name in RequiredNameIsJavaPackage()
107 diag->Error(DiagMessage(el->line_number) in RequiredAndroidAttribute()
121 diag->Error(DiagMessage(el->line_number) in RequiredOneAndroidAttribute()
127 diag->Error(DiagMessage(el->line_number) in RequiredOneAndroidAttribute()
152 diag->Error(DiagMessage(el->line_number) in AutoGenerateIsFeatureSplit()
[all …]
DProductFilter.cpp35 diag->Error(DiagMessage(config_value->value->GetSource()) in SelectProductToKeep()
42 DiagMessage(previously_selected_config_value->value->GetSource()) in SelectProductToKeep()
55 diag->Error(DiagMessage(config_value->value->GetSource()) in SelectProductToKeep()
62 DiagMessage(previously_default_config_value->value->GetSource()) in SelectProductToKeep()
73 diag->Error(DiagMessage() << "no default product defined for resource " in SelectProductToKeep()
DTableMerger.cpp74 context_->GetDiagnostics()->Warn(DiagMessage(src) << "ignoring package " << package->name); in MergeAndMangle()
101DiagMessage(src) << "cannot merge resource '" << dst_entry->name << "' with conflicting visibiliti… in MergeEntry()
117 context->GetDiagnostics()->Error(DiagMessage(src) << "cannot merge entry '" << src_entry->name in MergeEntry()
142 context->GetDiagnostics()->Error(DiagMessage(src_entry->overlayable_item.value().source) in MergeEntry()
145 context->GetDiagnostics()->Error(DiagMessage(dst_entry->overlayable_item.value().source) in MergeEntry()
157 context->GetDiagnostics()->Error(DiagMessage(src_entry->staged_id.value().source) in MergeEntry()
160 context->GetDiagnostics()->Error(DiagMessage(dst_entry->staged_id.value().source) in MergeEntry()
223 context->GetDiagnostics()->Error(DiagMessage(src_value->GetSource()) in MergeConfigValue()
226 context->GetDiagnostics()->Note(DiagMessage(dst_value->GetSource()) in MergeConfigValue()
260 context_->GetDiagnostics()->Error(DiagMessage(src) in DoMerge()
[all …]
DNoDefaultResourceRemover.cpp81 diag->Warn(DiagMessage() << "removing resource " << name in Consume()
84 diag->Note(DiagMessage() << " did you forget to remove all definitions?"); in Consume()
87 diag->Note(DiagMessage(config_value->value->GetSource()) << "defined here"); in Consume()
DReferenceLinker.cpp85 context_->GetDiagnostics()->Error(DiagMessage(value->GetSource()) in TransformDerived()
133 DiagMessage msg(entry.key.GetSource()); in TransformDerived()
142 context_->GetDiagnostics()->Error(DiagMessage(entry.key.GetSource()) in TransformDerived()
345 DiagMessage* out_msg) { in WriteAttributeName()
394 DiagMessage(reference.GetSource()) in LinkReference()
425 DiagMessage(reference.GetSource()) in LinkReference()
451 context->GetDiagnostics()->Error(DiagMessage(reference.GetSource()) in LinkReference()
474 context->GetDiagnostics()->Error(DiagMessage(entry->visibility.source) in Consume()
482 context->GetDiagnostics()->Error(DiagMessage(entry->overlayable_item.value().source) in Consume()
/frameworks/base/tools/aapt2/java/
DManifestClassGenerator.cpp47 diag->Error(DiagMessage(source) << "empty symbol"); in ExtractJavaIdentifier()
52 diag->Error(DiagMessage(source) << "invalid Java identifier '" << result << "'"); in ExtractJavaIdentifier()
62 diag->Error(DiagMessage(source) << "<" << el->name << "> must define 'android:name'"); in WriteSymbol()
77 diag->Warn(DiagMessage(source.WithLine(el->line_number)) in WriteSymbol()
86 diag->Error(DiagMessage(res->file.source) << "no root tag defined"); in GenerateManifestClass()
91 diag->Error(DiagMessage(res->file.source) << "no <manifest> root tag defined"); in GenerateManifestClass()
/frameworks/base/tools/aapt2/io/
DUtil.cpp33 context->GetDiagnostics()->Note(DiagMessage() << "writing " << out_path << " to archive"); in CopyInputStreamToArchive()
37 context->GetDiagnostics()->Error(DiagMessage() << "failed to write " << out_path in CopyInputStreamToArchive()
49 context->GetDiagnostics()->Error(DiagMessage(file->GetSource()) << "failed to open file"); in CopyFileToArchive()
66 context->GetDiagnostics()->Note(DiagMessage() << "writing " << out_path << " to archive"); in CopyProtoToArchive()
75 context->GetDiagnostics()->Error(DiagMessage() << "failed to write " << out_path in CopyProtoToArchive()
85 context->GetDiagnostics()->Error(DiagMessage() << "failed to write " << out_path in CopyProtoToArchive()
/frameworks/base/tools/aapt2/compile/
DInlineXmlFormatParser.cpp54 context_->GetDiagnostics()->Error(DiagMessage(src) << "missing 'name' attribute"); in Visit()
61 context_->GetDiagnostics()->Error(DiagMessage(src) << "invalid XML attribute '" << attr->value in Visit()
70 context_->GetDiagnostics()->Error(DiagMessage(src) in Visit()
142 context->GetDiagnostics()->Error(DiagMessage(child_source) in Consume()
147 context->GetDiagnostics()->Error(DiagMessage(child_source) in Consume()
163 context->GetDiagnostics()->Error(DiagMessage(new_doc->file.source) in Consume()
DPngCrunch.cpp71 diag->Warn(DiagMessage() << warning_msg); in LogWarning()
77 diag->Error(DiagMessage() << error_msg); in LogError()
157 source_diag.Error(DiagMessage() << "failed to read PNG signature: " << in->GetError()); in ReadPng()
159 source_diag.Error(DiagMessage() << "not enough data for PNG signature"); in ReadPng()
165 source_diag.Error(DiagMessage() << "file signature does not match PNG signature"); in ReadPng()
177 source_diag.Error(DiagMessage() << "failed to create libpng read png_struct"); in ReadPng()
184 source_diag.Error(DiagMessage() << "failed to create libpng read png_info"); in ReadPng()
257 source_diag.Error(DiagMessage() in ReadPng()
493 context->GetDiagnostics()->Error(DiagMessage() << "failed to create libpng write png_struct"); in WritePng()
500 context->GetDiagnostics()->Error(DiagMessage() << "failed to create libpng write png_info"); in WritePng()
[all …]
DPng.cpp104 diag->Warn(DiagMessage() << warningMessage); in logWarning()
110 diag->Error(DiagMessage() << "failed reading png"); in readPng()
386 diag->Note(DiagMessage() << "forcing image to gray (max deviation = " in analyze_image()
437 diag->Error(DiagMessage() << "failed to write png"); in writePng()
466 diag->Note(DiagMessage() << "writing image: w = " << info->width in writePng()
489 diag->Note(DiagMessage() << "has " << paletteEntries << " colors" in writePng()
494 diag->Note(DiagMessage() in writePng()
498 diag->Note(DiagMessage() in writePng()
502 diag->Note(DiagMessage() << "is opaque RGB, using PNG_COLOR_TYPE_RGB"); in writePng()
505 diag->Note(DiagMessage() in writePng()
[all …]
DIdAssigner.cpp272 diag->Error(DiagMessage() << "can't assign ID " << id << " to resource " << name in ReserveId()
285 diag->Error(DiagMessage() << "can't assign ID " << id << " to resource " << name in ReserveId()
296 diag->Error(DiagMessage() << "can't assign ID " << id << " to resource " << name in ReserveId()
305 diag->Error(DiagMessage() << "can't assign ID " << id << " to resource " << name << " because " in ReserveId()
334 diag->Error(DiagMessage() << "can't assign resource ID to resource " << name << " because " in NextId()
/frameworks/base/tools/aapt2/xml/
DXmlActionExecutor.cpp54 static void PrintElementToDiagMessage(const Element* el, DiagMessage* msg) { in PrintElementToDiagMessage()
81 DiagMessage error_msg(child_el->line_number); in Execute()
109 source_diag.Error(DiagMessage() << "no root XML tag found"); in Execute()
124 DiagMessage error_msg(el->line_number); in Execute()

12