Merge "AAPT2: binary parser should be more lenient with files" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-04-29 21:39:26 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 4 deletions

View File

@@ -213,10 +213,10 @@ class OptimizeCommand {
if (file_ref->file == nullptr) {
ResourceNameRef name(pkg->name, type->type, entry->name);
context_->GetDiagnostics()->Error(DiagMessage(file_ref->GetSource())
context_->GetDiagnostics()->Warn(DiagMessage(file_ref->GetSource())
<< "file for resource " << name << " with config '"
<< config_value->config << "' not found");
return false;
continue;
}
const StringPiece entry_name = entry->name;

View File

@@ -439,11 +439,10 @@ std::unique_ptr<Item> BinaryResourceParser::ParseValue(const ResourceNameRef& na
if (file_ref != nullptr) {
file_ref->file = files_->FindFile(*file_ref->path);
if (file_ref->file == nullptr) {
context_->GetDiagnostics()->Error(DiagMessage() << "resource " << name << " for config '"
context_->GetDiagnostics()->Warn(DiagMessage() << "resource " << name << " for config '"
<< config << "' is a file reference to '"
<< *file_ref->path
<< "' but no such path exists");
return {};
}
}
}