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
This commit is contained in:
Chris Phoenix
2017-01-23 14:17:23 -08:00
parent 28952f5933
commit 6d0a0911d5
2 changed files with 2 additions and 4 deletions

View File

@@ -23,5 +23,5 @@ using android::hardware::light::V2_0::ILight;
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
return defaultPassthroughServiceImplementation<ILight>("light");
return defaultPassthroughServiceImplementation<ILight>();
}

View File

@@ -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();