Merge "AAPT2: binary parser should be more lenient with files" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
557a0c50a0
@@ -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;
|
||||
|
||||
@@ -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 {};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user