mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Update inheritance test implementation.
HIDL_FETCH_IParent returns a child object when the "child" instance name is requested. Bug: 67104214 Test: hidl's run_all_device_tests.sh Change-Id: Ie4b85d657e5d066fb77832e188062af29bc2e7c6
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#define LOG_TAG "hidl_test"
|
||||
|
||||
#include "Parent.h"
|
||||
|
||||
#include <log/log.h>
|
||||
|
||||
#include "Parent.h"
|
||||
#include "Child.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
@@ -23,8 +25,11 @@ Return<void> Parent::doParent() {
|
||||
return Void();
|
||||
}
|
||||
|
||||
IParent* HIDL_FETCH_IParent(const char* name) {
|
||||
if (name == std::string("child")) {
|
||||
return new Child();
|
||||
}
|
||||
|
||||
IParent* HIDL_FETCH_IParent(const char* /* name */) {
|
||||
return new Parent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user