diff options
| author | 2019-10-09 16:53:31 -0700 | |
|---|---|---|
| committer | 2019-10-09 16:53:31 -0700 | |
| commit | a932b9f2f32c48f5b2562a1278ffb98786e45dab (patch) | |
| tree | 9a0029f8c3162d646ad68a93fbce34cb0bff8935 | |
| parent | 21409a7abc50a45d9de48a01cc83eadbe3b33956 (diff) | |
| parent | b15d9c76dfc8d82304c0684b951c74ef2e98f8d5 (diff) | |
Merge "IMemory: add unsecurePointer"
am: b15d9c76df
Change-Id: I16d7db85bc24eda7959007fd4d78462e2ccc21cd
| -rw-r--r-- | libs/binder/IMemory.cpp | 4 | ||||
| -rw-r--r-- | libs/binder/include/binder/IMemory.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp index 094f89f7d9..222b32c921 100644 --- a/libs/binder/IMemory.cpp +++ b/libs/binder/IMemory.cpp @@ -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); diff --git a/libs/binder/include/binder/IMemory.h b/libs/binder/include/binder/IMemory.h index 372802978b..98e92c4441 100644 --- a/libs/binder/include/binder/IMemory.h +++ b/libs/binder/include/binder/IMemory.h @@ -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; |