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

Commit 69bcb1a8 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "IMemory: add unsecurePointer" am: b15d9c76

am: a932b9f2

Change-Id: Ib6fa0d5fb646ea0b8a643996f583ed4e53de0d75
parents 8d044461 a932b9f2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -149,6 +149,10 @@ void* IMemory::fastPointer(const sp<IBinder>& binder, ssize_t offset) const
    return static_cast<char*>(base) + offset;
}

void* IMemory::unsecurePointer() const {
    return pointer();
}

void* IMemory::pointer() const {
    ssize_t offset;
    sp<IMemoryHeap> heap = getMemory(&offset);
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ public:
    // NOLINTNEXTLINE(google-default-arguments)
    virtual sp<IMemoryHeap> getMemory(ssize_t* offset=nullptr, size_t* size=nullptr) const = 0;

    void* unsecurePointer() const;

    // helpers
    void* fastPointer(const sp<IBinder>& heap, ssize_t offset) const;
    void* pointer() const;