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
diff --git a/graphics/allocator/2.0/default/service.cpp b/graphics/allocator/2.0/default/service.cpp
index 525b342..a43740c 100644
--- a/graphics/allocator/2.0/default/service.cpp
+++ b/graphics/allocator/2.0/default/service.cpp
@@ -24,5 +24,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IAllocator>("gralloc");
+ return defaultPassthroughServiceImplementation<IAllocator>();
}
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
index a0443d6..d45463e 100644
--- a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
@@ -72,7 +72,7 @@
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) {
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
index e3e35bb..60cc2a5 100644
--- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
@@ -749,7 +749,7 @@
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 @@
});
ASSERT_NE(nullptr, mAllocatorClient.get());
- mMapper = IMapper::getService("gralloc-mapper");
+ mMapper = IMapper::getService();
ASSERT_NE(nullptr, mMapper.get());
ASSERT_FALSE(mMapper->isRemote());
}
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
index 840da1a..65ad63a 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
@@ -36,7 +36,7 @@
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 @@
});
ASSERT_NE(mAllocatorClient, nullptr);
- mMapper = IMapper::getService("gralloc-mapper");
+ mMapper = IMapper::getService();
ASSERT_NE(nullptr, mMapper.get());
ASSERT_FALSE(mMapper->isRemote());