health 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

Bug: 33844934
Change-Id: I9a1fd3ba598bf058b6212bd416ecdf90ea329539
This commit is contained in:
Chris Phoenix 2017-01-23 14:49:09 -08:00 committed by Yifan Hong
parent bb5a8380b0
commit 68f4085e07

View file

@ -82,7 +82,7 @@ void healthd_board_init(struct healthd_config *config) {
// Initialize the board HAL - Equivalent of healthd_board_init(config)
// in charger/recovery mode.
gHealth = IHealth::getService("health");
gHealth = IHealth::getService();
if (gHealth == nullptr) {
KLOG_WARNING(LOG_TAG, "unable to get HAL interface, using defaults\n");
return;