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:
parent
9960148420
commit
9d320e3fbe
1 changed files with 7 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue