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

Commit c8e32958 authored by Chris Phoenix's avatar Chris Phoenix Committed by Yifan Hong
Browse files

gralloc 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: Ic3859ccf21e7ee5177f47cb06e3e0c93dd572bf6
parent 4ba4bdcb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,5 +24,5 @@ using android::hardware::graphics::allocator::V2_0::IAllocator;
using android::hardware::defaultPassthroughServiceImplementation;

int main() {
    return defaultPassthroughServiceImplementation<IAllocator>("gralloc");
    return defaultPassthroughServiceImplementation<IAllocator>();
}
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ class TempDescriptor {
class GraphicsAllocatorHidlTest : public ::testing::Test {
 protected:
  void SetUp() override {
    mAllocator = IAllocator::getService("gralloc");
    mAllocator = IAllocator::getService();
    ASSERT_NE(mAllocator, nullptr);

    mAllocator->createClient([this](const auto& error, const auto& client) {
+2 −2
Original line number Diff line number Diff line
@@ -749,7 +749,7 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest {

 private:
  void SetUpGralloc() {
    mAllocator = IAllocator::getService("gralloc");
    mAllocator = IAllocator::getService();
    ASSERT_NE(nullptr, mAllocator.get());

    mAllocator->createClient([this](const auto& error, const auto& client) {
@@ -759,7 +759,7 @@ class GraphicsComposerHidlCommandTest : public GraphicsComposerHidlTest {
    });
    ASSERT_NE(nullptr, mAllocatorClient.get());

    mMapper = IMapper::getService("gralloc-mapper");
    mMapper = IMapper::getService();
    ASSERT_NE(nullptr, mMapper.get());
    ASSERT_FALSE(mMapper->isRemote());
  }
+2 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ using namespace android::hardware::graphics::common::V1_0;
class GraphicsMapperHidlTest : public ::testing::Test {
 protected:
  void SetUp() override {
    mAllocator = IAllocator::getService("gralloc");
    mAllocator = IAllocator::getService();
    ASSERT_NE(mAllocator, nullptr);

    mAllocator->createClient([this](const auto& error, const auto& client) {
@@ -46,7 +46,7 @@ class GraphicsMapperHidlTest : public ::testing::Test {
    });
    ASSERT_NE(mAllocatorClient, nullptr);

    mMapper = IMapper::getService("gralloc-mapper");
    mMapper = IMapper::getService();
    ASSERT_NE(nullptr, mMapper.get());
    ASSERT_FALSE(mMapper->isRemote());