Make needsCheckpoint cover whole session

This makes needCheckpoint return true when the device will or is using
checkpointing.

Test: vdc checkpoint startCheckpoint 1
      reboot
      vdc checkpoint needsCheckpoint
      should return 1 before and after data mounts, and 0 once the
      checkpoint has been committed

Change-Id: Ib57f4461d837f41a8110ed318168165a684d913a
gugelfrei
Daniel Rosenberg 5 years ago
parent a41b7849d0
commit 84203c1e24

@ -212,6 +212,8 @@ bool cp_needsCheckpoint() {
std::string content;
sp<IBootControl> module = IBootControl::getService();
if (isCheckpointing) return isCheckpointing;
if (module && module->isSlotMarkedSuccessful(module->getCurrentSlot()) == BoolResult::FALSE) {
isCheckpointing = true;
return true;

Loading…
Cancel
Save