aboutsummaryrefslogtreecommitdiff
path: root/Coordinator.cpp
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2018-02-06 13:15:55 -0800
committerSteven Moreland <smoreland@google.com>2018-02-07 11:58:39 -0800
commit4c997e18dd27a0091034e58b4133f4f4198a2084 (patch)
tree58fa92f4ce833df4f59c612ff5637903cae773fd /Coordinator.cpp
parent04dea8d14fa4089d690e71f1b79d7d3b810c7272 (diff)
downloadhidl-4c997e18dd27a0091034e58b4133f4f4198a2084.tar.gz
Track file access for hashing.
This wasn't done before because it couldn't be done. Bug: 73001417 Test: hidl-gen -v -Lcheck android.hardware.nfc@1.0 Change-Id: Ib965c34d5d4c5defb3d73804be9b860012204905
Diffstat (limited to 'Coordinator.cpp')
-rw-r--r--Coordinator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Coordinator.cpp b/Coordinator.cpp
index 4d133a97..707e998a 100644
--- a/Coordinator.cpp
+++ b/Coordinator.cpp
@@ -182,6 +182,7 @@ AST* Coordinator::parse(const FQName& fqName, std::set<AST*>* parsedASTs,
path.append(fqName.name());
path.append(".hal");
+ onFileAccess(path, "r");
AST* ast = new AST(this, &Hash::getHash(path));
if (typesAST != NULL) {
@@ -190,7 +191,6 @@ AST* Coordinator::parse(const FQName& fqName, std::set<AST*>* parsedASTs,
ast->addImportedAST(typesAST);
}
- onFileAccess(ast->getFilename(), "r");
if (parseFile(ast) != OK || ast->postParse() != OK) {
delete ast;
ast = nullptr;
@@ -693,6 +693,7 @@ Coordinator::HashStatus Coordinator::checkHash(const FQName& fqName) const {
std::string hashPath = makeAbsolute(getPackageRootPath(fqName)) + "/current.txt";
std::string error;
+ onFileAccess(hashPath, "r");
std::vector<std::string> frozen = Hash::lookupHash(hashPath, fqName.string(), &error);
if (error.size() > 0) {