keymaster: provide instance name to getService()
Bug: 38430282
Test: VtsHalKeymasterV3_0TargetTest pass with exception
of (AesEcbWithUserId, RsaAttestation, EcAttestation)
which are expected failures.
Change-Id: I48e7195f512190deb608f1a69783c92254eef1aa
diff --git a/keymaster/4.0/support/Keymaster.cpp b/keymaster/4.0/support/Keymaster.cpp
index bf52c47..fac0017 100644
--- a/keymaster/4.0/support/Keymaster.cpp
+++ b/keymaster/4.0/support/Keymaster.cpp
@@ -40,7 +40,7 @@
serviceManager->listByInterface(descriptor, [&](const hidl_vec<hidl_string>& names) {
for (auto& name : names) {
if (name == "default") foundDefault = true;
- auto device = Wrapper::WrappedIKeymasterDevice::getService();
+ auto device = Wrapper::WrappedIKeymasterDevice::getService(name);
CHECK(device) << "Failed to get service for " << descriptor << " with interface name "
<< name;
result.push_back(std::unique_ptr<Keymaster>(new Wrapper(device, name)));