Store checksum in non-volatile store to detect corruption.
Store 2-byte checksum in the first two bytes of the non-volatile store.
If corruption is detected, delete all content in non-volatile store.
Change-Id: I79ca57796da1950a430064e50752c4a9fae6d05e
diff --git a/Android.mk b/Android.mk
index 9b0e898..70d7109 100755
--- a/Android.mk
+++ b/Android.mk
@@ -55,7 +55,8 @@
LOCAL_MODULE := nfc_nci.$(TARGET_DEVICE)
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
LOCAL_SRC_FILES := $(call all-c-files-under, $(HALIMPL)) \
- $(call all-cpp-files-under, $(HALIMPL))
+ $(call all-cpp-files-under, $(HALIMPL)) \
+ src/adaptation/CrcChecksum.cpp
LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware_legacy libstlport
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := external/stlport/stlport bionic/ bionic/libstdc++/include \