Revert "Introduce RSInfo and its reader/extractor/writer."
This reverts commit 255cbc8a78131fd828de0fac3ff70baeaa2f032f.
Conflicts:
lib/ExecutionEngine/RSInfoExtractor.cpp
Change-Id: I533398c25cd7fde2a76418101d29374b6e1d2b27
diff --git a/lib/ExecutionEngine/MCCacheReader.cpp b/lib/ExecutionEngine/MCCacheReader.cpp
index dc4ba92..1a74ed3 100644
--- a/lib/ExecutionEngine/MCCacheReader.cpp
+++ b/lib/ExecutionEngine/MCCacheReader.cpp
@@ -289,16 +289,17 @@
}
vector<char const *> &strPool = mpResult->mStringPool;
- map<string, unsigned char const *>::iterator dep;
+ map<string, pair<uint32_t, unsigned char const *> >::iterator dep;
dep = mDependencies.begin();
for (size_t i = 0; i < mpCachedDependTable->count; ++i, ++dep) {
string const &depName = dep->first;
- unsigned char const *depSHA1 = dep->second;
+ uint32_t depType = dep->second.first;
+ unsigned char const *depSHA1 = dep->second.second;
MCO_Dependency *depCached =&mpCachedDependTable->table[i];
char const *depCachedName = strPool[depCached->res_name_strp_index];
- //uint32_t depCachedType = depCached->res_type;
+ uint32_t depCachedType = depCached->res_type;
unsigned char const *depCachedSHA1 = depCached->sha1;
if (depName != depCachedName) {
@@ -325,6 +326,11 @@
return false;
}
+
+ if (depType != depCachedType) {
+ ALOGE("Cache dependency %s resource type mismatch.\n", depCachedName);
+ return false;
+ }
}
return true;