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

Commit 9d320e3f authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent 99601484
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
#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();
}