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

Commit 6de0aa81 authored by Steven Moreland's avatar Steven Moreland Committed by Martijn Coenen
Browse files

MemoryTest: add method for testing

Bug: 34134129
Test: compiles
Change-Id: If0d2a9c00f93f548da5e9261a93d4715412620c3
parent cb5989d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
};
+5 −0
Original line number Diff line number Diff line
@@ -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);

+2 −0
Original line number Diff line number Diff line
@@ -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;

};