bootctrl 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: I2c0aa199b5649f720710bfd564c077b6ce3acc9c Merged-In: I43f282ffedf18e4b0817b49fc4860ac39b127d04
This commit is contained in:
parent
5c959c69dc
commit
5f5782276f
2 changed files with 4 additions and 4 deletions
|
@ -78,14 +78,14 @@ Return<void> BootControl::getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IBootControl* HIDL_FETCH_IBootControl(const char* hal) {
|
IBootControl* HIDL_FETCH_IBootControl(const char* /* hal */) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
boot_control_module_t* module = NULL;
|
boot_control_module_t* module = NULL;
|
||||||
hw_module_t **hwm = reinterpret_cast<hw_module_t**>(&module);
|
hw_module_t **hwm = reinterpret_cast<hw_module_t**>(&module);
|
||||||
ret = hw_get_module(hal, const_cast<const hw_module_t**>(hwm));
|
ret = hw_get_module(BOOT_CONTROL_HARDWARE_MODULE_ID, const_cast<const hw_module_t**>(hwm));
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
ALOGE("hw_get_module %s failed: %d", hal, ret);
|
ALOGE("hw_get_module %s failed: %d", BOOT_CONTROL_HARDWARE_MODULE_ID, ret);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
module->init(module);
|
module->init(module);
|
||||||
|
|
|
@ -7,5 +7,5 @@ using ::android::hardware::boot::V1_0::IBootControl;
|
||||||
using android::hardware::defaultPassthroughServiceImplementation;
|
using android::hardware::defaultPassthroughServiceImplementation;
|
||||||
|
|
||||||
int main (int /* argc */, char * /* argv */ []) {
|
int main (int /* argc */, char * /* argv */ []) {
|
||||||
return defaultPassthroughServiceImplementation<IBootControl>("bootctrl");
|
return defaultPassthroughServiceImplementation<IBootControl>();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue