From c47f0988a36c3032a3c8850c4df3a704dd59e468 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 14 Mar 2013 02:56:34 +0000 Subject: [PATCH] Revert "Add a compatibility symbol for the MemoryBase constructor." Cherry pick from AOSP to fix the build. See https://android-review.googlesource.com/#/c/53690/ This reverts commit 7f974ff2f317ffbf9256579109f000ec876c3037 Change-Id: I1b123f446d0ff41e11ff81d4ef5f1472b59cac93 --- include/binder/MemoryBase.h | 3 --- libs/binder/IMemory.cpp | 6 +++--- libs/binder/MemoryBase.cpp | 9 --------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/include/binder/MemoryBase.h b/include/binder/MemoryBase.h index fa0b8d17b..463e26d97 100644 --- a/include/binder/MemoryBase.h +++ b/include/binder/MemoryBase.h @@ -40,9 +40,6 @@ protected: const sp& getHeap() const { return mHeap; } private: - // Backwards compatibility for libdatabase_sqlcipher (http://b/8253769). - MemoryBase(const sp& heap, long offset, unsigned int size); - size_t mSize; ssize_t mOffset; sp mHeap; diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp index 947ac1919..cd2451a67 100644 --- a/libs/binder/IMemory.cpp +++ b/libs/binder/IMemory.cpp @@ -298,11 +298,11 @@ void BpMemoryHeap::assertReallyMapped() const uint32_t flags = reply.readInt32(); uint32_t offset = reply.readInt32(); - ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%d, err=%d (%s)", + ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)", asBinder().get(), parcel_fd, size, err, strerror(-err)); int fd = dup( parcel_fd ); - ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%d, err=%d (%s)", + ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)", parcel_fd, size, err, strerror(errno)); int access = PROT_READ; @@ -315,7 +315,7 @@ void BpMemoryHeap::assertReallyMapped() const mRealHeap = true; mBase = mmap(0, size, access, MAP_SHARED, fd, offset); if (mBase == MAP_FAILED) { - ALOGE("cannot map BpMemoryHeap (binder=%p), size=%d, fd=%d (%s)", + ALOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)", asBinder().get(), size, fd, strerror(errno)); close(fd); } else { diff --git a/libs/binder/MemoryBase.cpp b/libs/binder/MemoryBase.cpp index 835124f51..033066bea 100644 --- a/libs/binder/MemoryBase.cpp +++ b/libs/binder/MemoryBase.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#define LOG_TAG "MemoryBase" #include #include @@ -32,14 +31,6 @@ MemoryBase::MemoryBase(const sp& heap, { } -MemoryBase::MemoryBase(const sp& 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 MemoryBase::getMemory(ssize_t* offset, size_t* size) const { if (offset) *offset = mOffset;