From 6d0a0911d5de40a91b05c47bf85aa76b7c617f94 Mon Sep 17 00:00:00 2001 From: Chris Phoenix Date: Mon, 23 Jan 2017 14:17:23 -0800 Subject: [PATCH] light 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: I042320d62f88ba9585ee05f33fe7592b5ffa1884 --- light/2.0/default/service.cpp | 2 +- light/2.0/vts/functional/light_hidl_hal_test.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/light/2.0/default/service.cpp b/light/2.0/default/service.cpp index b3848e95f4..70ae5655d1 100644 --- a/light/2.0/default/service.cpp +++ b/light/2.0/default/service.cpp @@ -23,5 +23,5 @@ using android::hardware::light::V2_0::ILight; using android::hardware::defaultPassthroughServiceImplementation; int main() { - return defaultPassthroughServiceImplementation("light"); + return defaultPassthroughServiceImplementation(); } diff --git a/light/2.0/vts/functional/light_hidl_hal_test.cpp b/light/2.0/vts/functional/light_hidl_hal_test.cpp index 9b9f543259..71a8b4e5f2 100644 --- a/light/2.0/vts/functional/light_hidl_hal_test.cpp +++ b/light/2.0/vts/functional/light_hidl_hal_test.cpp @@ -34,15 +34,13 @@ using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; -#define LIGHT_SERVICE_NAME "light" - #define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk()) #define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk()) class LightHidlTest : public ::testing::Test { public: virtual void SetUp() override { - light = ILight::getService(LIGHT_SERVICE_NAME); + light = ILight::getService(); ASSERT_NE(light, nullptr); LOG(INFO) << "Test is remote " << light->isRemote();