aboutsummaryrefslogtreecommitdiff
path: root/citadel
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2018-03-06 23:39:29 +0000
committerAndrew Scull <ascull@google.com>2018-03-07 00:14:58 +0000
commitc48e911d96ef4e9205a3e9bc9c55fd02b0805abf (patch)
tree2dd6fb55394ed45d137eaef188d0fe2b0c58442f /citadel
parent641e3bf10361351830c471d9228e66cbd20b61b4 (diff)
downloadandroid-c48e911d96ef4e9205a3e9bc9c55fd02b0805abf.tar.gz
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
Diffstat (limited to 'citadel')
-rw-r--r--citadel/citadeld/CitadeldProxyClient.cpp4
-rw-r--r--citadel/citadeld/include/nos/CitadeldProxyClient.h6
2 files changed, 9 insertions, 1 deletions
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<ICitadeld> _citadeld;
public:
CitadeldProxyClient() = default;
@@ -43,6 +45,8 @@ public:
uint32_t CallApp(uint32_t appId, uint16_t arg,
const std::vector<uint8_t>& request,
std::vector<uint8_t>* response) override;
+
+ ICitadeld& Citadeld();
};
} // namespace nos