From 26ae7f4613a3d596dbf00afc5582cbac2caffcff Mon Sep 17 00:00:00 2001 From: Chris Phoenix Date: Wed, 18 Jan 2017 17:13:17 -0800 Subject: [PATCH] consumerir HAL uses "default" service name The getService() and registerAsService() methods of interface objects now have default parameters of "default" for the service name. HALs will not have to use any service name unless they want to register more than one service. Test: builds; verify HAL still works In support of b/33844934 Change-Id: Ie7394569d20afba0228f01830385eb598795c831 Merged-In: I1b3b021aaa98ce99560126ddd277caa427ddf151 --- ir/1.0/default/ConsumerIr.cpp | 6 +++--- ir/1.0/default/service.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ir/1.0/default/ConsumerIr.cpp b/ir/1.0/default/ConsumerIr.cpp index b96c69551b..69a25cf5b4 100644 --- a/ir/1.0/default/ConsumerIr.cpp +++ b/ir/1.0/default/ConsumerIr.cpp @@ -63,13 +63,13 @@ Return ConsumerIr::getCarrierFreqs(getCarrierFreqs_cb _hidl_cb) { } -IConsumerIr* HIDL_FETCH_IConsumerIr(const char *name) { +IConsumerIr* HIDL_FETCH_IConsumerIr(const char * /*name*/) { consumerir_device_t *dev; const hw_module_t *hw_module = NULL; - int ret = hw_get_module(name, &hw_module); + int ret = hw_get_module(CONSUMERIR_HARDWARE_MODULE_ID, &hw_module); if (ret != 0) { - ALOGE("hw_get_module %s failed: %d", name, ret); + ALOGE("hw_get_module %s failed: %d", CONSUMERIR_HARDWARE_MODULE_ID, ret); return nullptr; } ret = hw_module->methods->open(hw_module, CONSUMERIR_TRANSMITTER, (hw_device_t **) &dev); diff --git a/ir/1.0/default/service.cpp b/ir/1.0/default/service.cpp index 237b2c9e7f..10f6b7d133 100644 --- a/ir/1.0/default/service.cpp +++ b/ir/1.0/default/service.cpp @@ -23,5 +23,5 @@ using android::hardware::ir::V1_0::IConsumerIr; using android::hardware::defaultPassthroughServiceImplementation; int main() { - return defaultPassthroughServiceImplementation("consumerir"); + return defaultPassthroughServiceImplementation(); }