display: Add HDMI CEC HAL
Implement the spec as per
hardware/libhardware/include/hardware/hdmi_cec.h
Change-Id: I02e1ba9deee1007b7e5922c363b9f5d6c6ad82a9
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 05ab503..f43b9df 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -376,14 +376,15 @@
//independent process as well.
QService::init();
sp<IQClient> client = new QClient(ctx);
- android::sp<qService::IQService> qservice_sp = interface_cast<IQService>(
+ sp<IQService> iqs = interface_cast<IQService>(
defaultServiceManager()->getService(
String16("display.qservice")));
- if (qservice_sp.get()) {
- qservice_sp->connect(client);
+ if (iqs.get()) {
+ iqs->connect(client);
+ ctx->mQService = reinterpret_cast<QService* >(iqs.get());
} else {
ALOGE("%s: Failed to acquire service pointer", __FUNCTION__);
- return ;
+ return;
}
// Initialize device orientation to its default orientation
@@ -479,7 +480,10 @@
ctx->mAD = NULL;
}
-
+ if(ctx->mQService) {
+ delete ctx->mQService;
+ ctx->mQService = NULL;
+ }
}
//Helper to roundoff the refreshrates