Convert BootControl HAL to binder.
The new HAL specification uses HIDL to communicate between the caller
and the HAL code itself, which is now what the BootControlAndroid
implementation does. Nevertheless, since update_engine_sideload uses
the boot_control HAL directly as a static library this patch keeps the
old implementation around, now called BootControlRecovery for this
purpose.
Bug: 31863957
Test: Applied an update on master.
Change-Id: Ib2f0c4f0c616e76d19cc78b9b7e44bc55aec8ffa
diff --git a/boot_control_android.h b/boot_control_android.h
index a5a6255..1de0e41 100644
--- a/boot_control_android.h
+++ b/boot_control_android.h
@@ -19,8 +19,7 @@
#include <string>
-#include <hardware/boot_control.h>
-#include <hardware/hardware.h>
+#include <android/hardware/boot/1.0/IBootControl.h>
#include "update_engine/common/boot_control.h"
@@ -49,9 +48,7 @@
bool MarkBootSuccessfulAsync(base::Callback<void(bool)> callback) override;
private:
- // NOTE: There is no way to release/unload HAL implementations so
- // this is essentially leaked on object destruction.
- boot_control_module_t* module_;
+ ::android::sp<::android::hardware::boot::V1_0::IBootControl> module_;
DISALLOW_COPY_AND_ASSIGN(BootControlAndroid);
};