MemoryTest: add method for testing

Bug: 34134129
Test: compiles
Change-Id: If0d2a9c00f93f548da5e9261a93d4715412620c3
diff --git a/tests/memory/1.0/IMemoryTest.hal b/tests/memory/1.0/IMemoryTest.hal
index c20c536..4d6de3f 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 40bb2dc..37a2a60 100644
--- a/tests/memory/1.0/default/MemoryTest.cpp
+++ b/tests/memory/1.0/default/MemoryTest.cpp
@@ -34,6 +34,11 @@
 namespace implementation {
 
 // Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow.
+Return<void> Memory::haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) {
+    _hidl_cb(mem);
+    return Void();
+}
+
 Return<void> Memory::fillMemory(const hidl_memory& memory_in, uint8_t filler) {
     sp<IMemory> memory = mapMemory(memory_in);
 
diff --git a/tests/memory/1.0/default/MemoryTest.h b/tests/memory/1.0/default/MemoryTest.h
index 5cab494..0d903f1 100644
--- a/tests/memory/1.0/default/MemoryTest.h
+++ b/tests/memory/1.0/default/MemoryTest.h
@@ -39,6 +39,8 @@
 
 struct Memory : public IMemoryTest {
     // Methods from ::android::hardware::tests::memory::V1_0::IMemoryTest follow.
+    Return<void> haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) override;
+
     Return<void> fillMemory(const hidl_memory& memory_in, uint8_t filler) override;
 
 };