MemoryTest: add method for testing

Bug: 34134129
Test: compiles
Change-Id: If0d2a9c00f93f548da5e9261a93d4715412620c3
This commit is contained in:
Steven Moreland
2017-01-06 18:57:21 -08:00
committed by Martijn Coenen
parent cb5989d239
commit 6de0aa81a3
3 changed files with 8 additions and 0 deletions

View File

@@ -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);
};

View File

@@ -34,6 +34,11 @@ namespace V1_0 {
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);

View File

@@ -39,6 +39,8 @@ using ::android::sp;
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;
};