When preserving non-volatile storage files, detect corruption.
When non-volatile storage files are preserved during cold boot,
JNI must detect corruption in their contents by verifying their
checksums.
Change-Id: I191ac013f12dabda43e590449a80523bc42c0c90
diff --git a/src/adaptation/NfcAdaptation.cpp b/src/adaptation/NfcAdaptation.cpp
index 945de1e..145c3de 100755
--- a/src/adaptation/NfcAdaptation.cpp
+++ b/src/adaptation/NfcAdaptation.cpp
@@ -127,12 +127,12 @@
initializeGlobalAppLogLevel ();
+ verify_stack_non_volatile_store ();
if ( GetNumValue ( NAME_PRESERVE_STORAGE, (char*)&num, sizeof ( num ) ) &&
(num == 1) )
ALOGD ("%s: preserve stack NV store", __FUNCTION__);
else
{
- verify_stack_non_volatile_store ();
delete_stack_non_volatile_store (FALSE);
}