diff --git a/tests/memory/1.0/IMemoryTest.hal b/tests/memory/1.0/IMemoryTest.hal index c20c536e8e..4d6de3f2fc 100644 --- a/tests/memory/1.0/IMemoryTest.hal +++ b/tests/memory/1.0/IMemoryTest.hal @@ -17,5 +17,6 @@ package android.hardware.tests.memory@1.0; interface IMemoryTest { + haveSomeMemory(memory mem) generates(memory mem); fillMemory(memory memory_in, uint8_t filler); }; diff --git a/tests/memory/1.0/default/MemoryTest.cpp b/tests/memory/1.0/default/MemoryTest.cpp index 40bb2dc7e4..37a2a6065a 100644 --- a/tests/memory/1.0/default/MemoryTest.cpp +++ b/tests/memory/1.0/default/MemoryTest.cpp @@ -34,6 +34,11 @@ namespace V1_0 { namespace implementation { // Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow. +Return Memory::haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) { + _hidl_cb(mem); + return Void(); +} + Return Memory::fillMemory(const hidl_memory& memory_in, uint8_t filler) { sp memory = mapMemory(memory_in); diff --git a/tests/memory/1.0/default/MemoryTest.h b/tests/memory/1.0/default/MemoryTest.h index 5cab49427a..0d903f157f 100644 --- a/tests/memory/1.0/default/MemoryTest.h +++ b/tests/memory/1.0/default/MemoryTest.h @@ -39,6 +39,8 @@ using ::android::sp; struct Memory : public IMemoryTest { // Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow. + Return haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) override; + Return fillMemory(const hidl_memory& memory_in, uint8_t filler) override; };