rebootescrow: use property to find device
To allow vendors to have different names for their devices, read the
device name from a system property.
Test: atest VtsHalRebootEscrowTargetTest
Bug: 146400078
Change-Id: I93f37e14139532ab192795dcad27c586545a1bc4
diff --git a/rebootescrow/aidl/default/include/rebootescrow-impl/RebootEscrow.h b/rebootescrow/aidl/default/include/rebootescrow-impl/RebootEscrow.h
index 1ed7397..00ff16b 100644
--- a/rebootescrow/aidl/default/include/rebootescrow-impl/RebootEscrow.h
+++ b/rebootescrow/aidl/default/include/rebootescrow-impl/RebootEscrow.h
@@ -23,11 +23,14 @@
namespace hardware {
namespace rebootescrow {
-static const char* REBOOT_ESCROW_DEVICE = "/dev/access-kregistry";
-
class RebootEscrow : public BnRebootEscrow {
+ public:
+ explicit RebootEscrow(const std::string& devicePath) : devicePath_(devicePath) {}
ndk::ScopedAStatus storeKey(const std::vector<int8_t>& kek) override;
ndk::ScopedAStatus retrieveKey(std::vector<int8_t>* _aidl_return) override;
+
+ private:
+ const std::string devicePath_;
};
} // namespace rebootescrow