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

Commit 7f87523d authored by Arthur Ishiguro's avatar Arthur Ishiguro
Browse files

Revert^2 "Add ifdefs to compile out Parcel::Blob code"

18aeaef1

Change-Id: Id4568fc826d59c8a3e3329c3deebec23957a12e3
parent 175ce9ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -735,7 +735,7 @@ cc_library {
}

cc_library {
    name: "libbinder_rpc_no_blob",
    name: "libbinder_rpc_no_legacy",
    vendor_available: true,
    defaults: [
        "libbinder_common_defaults",
+4 −2
Original line number Diff line number Diff line
@@ -24,9 +24,9 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef BINDER_DISABLE_BLOB
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/stat.h>
#endif // BINDER_DISABLE_BLOB
#include <sys/types.h>
#include <unistd.h>
#include <algorithm>
@@ -3502,6 +3502,7 @@ size_t Parcel::getOpenAshmemSize() const

// --- Parcel::Blob ---

#ifndef BINDER_DISABLE_BLOB
Parcel::Blob::Blob() :
        mFd(-1), mData(nullptr), mSize(0), mMutable(false) {
}
@@ -3532,5 +3533,6 @@ void Parcel::Blob::clear() {
    mSize = 0;
    mMutable = false;
}
#endif // BINDER_DISABLE_BLOB

} // namespace android
+3 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@
    },
    {
      "name": "binderRpcTestSingleThreadedNoKernel"
    },
    {
      "name": "binderRpcTestNoLegacy"
    }
  ],
  "hwasan-presubmit": [
+8 −4
Original line number Diff line number Diff line
@@ -1399,6 +1399,7 @@ private:

    size_t mReserved;

#ifndef BINDER_DISABLE_BLOB
    class Blob {
    public:
        LIBBINDER_EXPORTED Blob();
@@ -1418,6 +1419,7 @@ private:
        size_t mSize;
        bool mMutable;
    };
#endif // BINDER_DISABLE_BLOB

#if defined(__clang__)
#pragma clang diagnostic push
@@ -1469,6 +1471,7 @@ private:
    LIBBINDER_EXPORTED status_t read(FlattenableHelperInterface& val) const;

public:
#ifndef BINDER_DISABLE_BLOB
    class ReadableBlob : public Blob {
        friend class Parcel;
    public:
@@ -1481,6 +1484,7 @@ public:
    public:
        LIBBINDER_EXPORTED inline void* data() { return mData; }
    };
#endif // BINDER_DISABLE_BLOB

    /**
     * Returns the total amount of ashmem memory owned by this object.
+11 −0
Original line number Diff line number Diff line
@@ -547,6 +547,17 @@ cc_test {
    ],
}

cc_test {
    name: "binderRpcTestNoLegacy",
    defaults: [
        "binderRpcTest_defaults",
        "binderRpcTest_static_defaults",
    ],
    static_libs: [
        "libbinder_rpc_no_legacy",
    ],
}

cc_test {
    name: "binderRpcTestNoKernelAtAll",
    defaults: [