Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d0a0911 authored by Chris Phoenix's avatar Chris Phoenix
Browse files

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
parent 28952f59
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,5 +23,5 @@ using android::hardware::light::V2_0::ILight;
using android::hardware::defaultPassthroughServiceImplementation;
using android::hardware::defaultPassthroughServiceImplementation;


int main() {
int main() {
    return defaultPassthroughServiceImplementation<ILight>("light");
    return defaultPassthroughServiceImplementation<ILight>();
}
}
+1 −3
Original line number Original line Diff line number Diff line
@@ -34,15 +34,13 @@ using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::Void;
using ::android::sp;
using ::android::sp;


#define LIGHT_SERVICE_NAME "light"

#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())


class LightHidlTest : public ::testing::Test {
class LightHidlTest : public ::testing::Test {
public:
public:
    virtual void SetUp() override {
    virtual void SetUp() override {
        light = ILight::getService(LIGHT_SERVICE_NAME);
        light = ILight::getService();


        ASSERT_NE(light, nullptr);
        ASSERT_NE(light, nullptr);
        LOG(INFO) << "Test is remote " << light->isRemote();
        LOG(INFO) << "Test is remote " << light->isRemote();