summaryrefslogtreecommitdiffstats
path: root/libs/binder/MemoryBase.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-03-13 14:35:55 -0700
committerElliott Hughes <enh@google.com>2013-03-13 18:19:20 -0700
commit7f974ff2f317ffbf9256579109f000ec876c3037 (patch)
tree0c7abf312040b931533ddf72874bbb2c8f9966bc /libs/binder/MemoryBase.cpp
parentba8abb517d1eddebeda62bf907fa446e3c3b81f6 (diff)
downloadframeworks_native-7f974ff2f317ffbf9256579109f000ec876c3037.zip
frameworks_native-7f974ff2f317ffbf9256579109f000ec876c3037.tar.gz
frameworks_native-7f974ff2f317ffbf9256579109f000ec876c3037.tar.bz2
Add a compatibility symbol for the MemoryBase constructor.
Third-party libraries are currently trying to use the MemoryBase constructor but failing because we fixed the definition of ssize_t. This is a stop-gap for users of this private API until we can get them fixed. Bug: 8253769 Change-Id: I8a19770f3252d88ee87023fde625cc6289924b0d
Diffstat (limited to 'libs/binder/MemoryBase.cpp')
-rw-r--r--libs/binder/MemoryBase.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/binder/MemoryBase.cpp b/libs/binder/MemoryBase.cpp
index 033066b..835124f 100644
--- a/libs/binder/MemoryBase.cpp
+++ b/libs/binder/MemoryBase.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#define LOG_TAG "MemoryBase"
#include <stdlib.h>
#include <stdint.h>
@@ -31,6 +32,14 @@ MemoryBase::MemoryBase(const sp<IMemoryHeap>& heap,
{
}
+MemoryBase::MemoryBase(const sp<IMemoryHeap>& heap,
+ long offset, unsigned int size)
+ : mSize(size), mOffset(offset), mHeap(heap)
+{
+ ALOGW("Using temporary compatibility workaround for usage of MemoryBase "
+ "private API. Please fix your application!");
+}
+
sp<IMemoryHeap> MemoryBase::getMemory(ssize_t* offset, size_t* size) const
{
if (offset) *offset = mOffset;