Adding a build id check to blob cache.
Add a build id field to the header structure in blob cache. Add build
id support with reading and writing the cache. When the cache gets
written it writes the build id at the end of the header. When read it
checks to see if there is a match between the current version and the
version in the cache. If not, it invalidates the cache which would
typically only occur during an ota update. Also remove blob cache
from the host build.
bug: 18262905
Change-Id: I753b1de1986703a4c1c8691b9d2bb533b2546143
diff --git a/libutils/Android.mk b/libutils/Android.mk
index f675a94..40cd31e 100644
--- a/libutils/Android.mk
+++ b/libutils/Android.mk
@@ -16,7 +16,6 @@
commonSources:= \
BasicHashtable.cpp \
- BlobCache.cpp \
CallStack.cpp \
FileMap.cpp \
JenkinsHash.cpp \
@@ -74,6 +73,7 @@
# we have the common sources, plus some device-specific stuff
LOCAL_SRC_FILES:= \
$(commonSources) \
+ BlobCache.cpp \
Looper.cpp \
Trace.cpp
@@ -83,7 +83,8 @@
LOCAL_CFLAGS += -Werror
LOCAL_STATIC_LIBRARIES := \
- libcutils
+ libcutils \
+ libc
LOCAL_SHARED_LIBRARIES := \
libbacktrace \