Merge "Fix crash in mainline" am: 3a0d51f6b7 am: 6c5944f899 am: 9cd7fdc882 am: 06bd0c427f
am: 0f3c17b50f
Change-Id: I5425ca6ef3f65fbbec7b6d105054d9abf9d39c09
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index a2db4bd..e5ef4a2 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -263,6 +263,11 @@
}
bool cp_needsCheckpoint() {
+ // Make sure we only return true during boot. See b/138952436 for discussion
+ static bool called_once = false;
+ if (called_once) return isCheckpointing;
+ called_once = true;
+
bool ret;
std::string content;
sp<IBootControl> module = IBootControl::getService();