sensors 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
Bug: 33844934
Change-Id: Iefb6dfe80ec8f4ab389d2b6529f9f968365289b2
diff --git a/sensors/1.0/default/service.cpp b/sensors/1.0/default/service.cpp
index f165a45..5bcfe4b 100644
--- a/sensors/1.0/default/service.cpp
+++ b/sensors/1.0/default/service.cpp
@@ -23,5 +23,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<ISensors>("sensors");
+ return defaultPassthroughServiceImplementation<ISensors>();
}
diff --git a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp b/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
index c7600f3..194afc2 100644
--- a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
+++ b/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp
@@ -41,8 +41,6 @@
using ::android::sp;
using namespace ::android::hardware::sensors::V1_0;
-#define SENSORS_SERVICE_NAME "sensors"
-
// Test environment for sensors
class SensorsHidlEnvironment : public ::testing::Environment {
public:
@@ -82,7 +80,7 @@
};
void SensorsHidlEnvironment::SetUp() {
- sensors = ISensors::getService(SENSORS_SERVICE_NAME, false);
+ sensors = ISensors::getService(false);
ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get());
ASSERT_NE(sensors, nullptr);