summaryrefslogtreecommitdiff
path: root/cmds/idmap/create.cpp
diff options
context:
space:
mode:
author Adam Lesinski <adamlesinski@google.com> 2017-09-06 20:58:32 +0000
committer android-build-merger <android-build-merger@google.com> 2017-09-06 20:58:32 +0000
commitd7f3a7b0959662d137068cafbe885f3e8ea2c36e (patch)
tree5222a079af8573cae93a5fed580cdaaee138b7da /cmds/idmap/create.cpp
parentaed3472304f87eb22d8fe0dd3f9e43c3816e956a (diff)
parenta15992086c63c38cb61ed23af8c5507d413c4776 (diff)
Merge "idmap: include idmap version in check for stale file" am: 609887a980
am: a15992086c Change-Id: Ib8510f7a156ef71926b1e3f339aa4426981d4745
Diffstat (limited to 'cmds/idmap/create.cpp')
-rw-r--r--cmds/idmap/create.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmds/idmap/create.cpp b/cmds/idmap/create.cpp
index 524db14f7aab..f415f8f5dd75 100644
--- a/cmds/idmap/create.cpp
+++ b/cmds/idmap/create.cpp
@@ -104,13 +104,17 @@ fail:
}
}
- uint32_t cached_target_crc, cached_overlay_crc;
+ uint32_t version, cached_target_crc, cached_overlay_crc;
String8 cached_target_path, cached_overlay_path;
- if (!ResTable::getIdmapInfo(buf, N, NULL, &cached_target_crc, &cached_overlay_crc,
+ if (!ResTable::getIdmapInfo(buf, N, &version, &cached_target_crc, &cached_overlay_crc,
&cached_target_path, &cached_overlay_path)) {
return true;
}
+ if (version != ResTable::IDMAP_CURRENT_VERSION) {
+ return true;
+ }
+
if (cached_target_path != target_apk_path) {
return true;
}