From c48e911d96ef4e9205a3e9bc9c55fd02b0805abf Mon Sep 17 00:00:00 2001 From: Andrew Scull Date: Tue, 6 Mar 2018 23:39:29 +0000 Subject: Expose handle to citadeld service. After opening a connection to citadeld, this handle can be used to directly invoke citadeld behaviour e.g. resetting the device. Change-Id: Ibe561011fb2a40601ca489689c5a67e7e076a1aa --- citadel/citadeld/CitadeldProxyClient.cpp | 4 ++++ citadel/citadeld/include/nos/CitadeldProxyClient.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'citadel') diff --git a/citadel/citadeld/CitadeldProxyClient.cpp b/citadel/citadeld/CitadeldProxyClient.cpp index a5d0378..6196d36 100644 --- a/citadel/citadeld/CitadeldProxyClient.cpp +++ b/citadel/citadeld/CitadeldProxyClient.cpp @@ -72,4 +72,8 @@ uint32_t CitadeldProxyClient::CallApp(uint32_t appId, uint16_t arg, return APP_ERROR_IO; } +ICitadeld& CitadeldProxyClient::Citadeld() { + return *_citadeld.get(); +} + } // namespace nos diff --git a/citadel/citadeld/include/nos/CitadeldProxyClient.h b/citadel/citadeld/include/nos/CitadeldProxyClient.h index 623de9d..0bcd583 100644 --- a/citadel/citadeld/include/nos/CitadeldProxyClient.h +++ b/citadel/citadeld/include/nos/CitadeldProxyClient.h @@ -26,12 +26,14 @@ namespace nos { +using ::android::hardware::citadel::ICitadeld; + /** * Implementation of NuggetClient to proxy calls via the citadeld synchronizing * daemon which coordinates communication between the HALs and Citadel. */ class CitadeldProxyClient : public NuggetClientInterface { - ::android::sp<::android::hardware::citadel::ICitadeld> _citadeld; + ::android::sp _citadeld; public: CitadeldProxyClient() = default; @@ -43,6 +45,8 @@ public: uint32_t CallApp(uint32_t appId, uint16_t arg, const std::vector& request, std::vector* response) override; + + ICitadeld& Citadeld(); }; } // namespace nos -- cgit v1.2.3