Switch to exceptions for most cp calls

This switches the checkpoint calls that don't need to return a value
to return 0 on success, and an error on failure. This will be transalted
to exceptions for java binder users. needsCheckpoint and needsRollback
still return a boolean value.

Test: vdc setCheckpoint 2 then reboot 3 times checking state
Bug: 112901762
Change-Id: Idd3b5e6036631562a86d5123f533b86cf3bd6032
Merged-In: Idd3b5e6036631562a86d5123f533b86cf3bd6032
diff --git a/Checkpoint.h b/Checkpoint.h
index f3554cc..eac2f94 100644
--- a/Checkpoint.h
+++ b/Checkpoint.h
@@ -17,26 +17,27 @@
 #ifndef _CHECKPOINT_H
 #define _CHECKPOINT_H
 
+#include <binder/Status.h>
 #include <string>
 
 namespace android {
 namespace vold {
 
-bool cp_startCheckpoint(int retry);
+android::binder::Status cp_startCheckpoint(int retry);
 
-bool cp_commitChanges();
+android::binder::Status cp_commitChanges();
 
-void cp_abortChanges();
+android::binder::Status cp_abortChanges();
 
 bool cp_needsRollback();
 
 bool cp_needsCheckpoint();
 
-bool cp_prepareCheckpoint();
+android::binder::Status cp_prepareCheckpoint();
 
-bool cp_restoreCheckpoint(const std::string& mountPoint);
+android::binder::Status cp_restoreCheckpoint(const std::string& mountPoint);
 
-bool cp_markBootAttempt();
+android::binder::Status cp_markBootAttempt();
 
 }  // namespace vold
 }  // namespace android