Add an API in update_engine to switch the slot back and forth
In some cases, the OTA update want to flip the slot to source
without cancelling the entire update. The functionality was
achieved by ResetStatus(). However ResetStatus() will clean up
the update progress and free up space to support virtual A/B.
Test: build
Bug: 187321613
Change-Id: I508c8034e69ad9f3159b985241451b0f5806bab7
diff --git a/aosp/binder_service_android.h b/aosp/binder_service_android.h
index f41fbdf..f1ce6b5 100644
--- a/aosp/binder_service_android.h
+++ b/aosp/binder_service_android.h
@@ -68,6 +68,9 @@
android::binder::Status resume() override;
android::binder::Status cancel() override;
android::binder::Status resetStatus() override;
+ android::binder::Status setShouldSwitchSlotOnReboot(
+ const android::String16& metadata_filename) override;
+ android::binder::Status resetShouldSwitchSlotOnReboot() override;
android::binder::Status verifyPayloadApplicable(
const android::String16& metadata_filename, bool* return_value) override;
android::binder::Status allocateSpaceForPayload(