Add checkpointing support for A/B updates

This adds implicit rollback support during A/B style updates.
If you explicitly start a checkpoint with -1, needsRollback will
trigger if the update fails, and should be used if any additional
cleanup is needed that is not covered by A/B itself.

Test: All Checkpoint tests pass
Bug: 111020314
Change-Id: I88b4a1098c6bac4dc1438a54c8a8f59577a6c17b
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index 41250c7..3884875 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -773,6 +773,14 @@
     return ok();
 }
 
+binder::Status VoldNativeService::needsRollback(bool* _aidl_return) {
+    ENFORCE_UID(AID_SYSTEM);
+    ACQUIRE_LOCK;
+
+    *_aidl_return = cp_needsRollback();
+    return ok();
+}
+
 binder::Status VoldNativeService::needsCheckpoint(bool* _aidl_return) {
     ENFORCE_UID(AID_SYSTEM);
     ACQUIRE_LOCK;