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

Commit f646841f authored by Dianne Hackborn's avatar Dianne Hackborn Committed by android-build-merger
Browse files

Merge "Add private helpers needed for job queue." into oc-dev

am: 68a23402

Change-Id: I2cc3f89d6b8034d8cbebde8fdd42a9b94a33f0da
parents 90e3fee9 68a23402
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -72,6 +72,8 @@ public:
    status_t            appendFrom(const Parcel *parcel,
                                   size_t start, size_t len);

    int                 compareData(const Parcel& other);

    bool                allowFds() const;
    bool                pushAllowFds(bool allowFds);
    void                restoreAllowFds(bool lastValue);
+8 −0
Original line number Diff line number Diff line
@@ -553,6 +553,14 @@ status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len)
    return err;
}

int Parcel::compareData(const Parcel& other) {
    size_t size = dataSize();
    if (size != other.dataSize()) {
        return size < other.dataSize() ? -1 : 1;
    }
    return memcmp(data(), other.data(), size);
}

bool Parcel::allowFds() const
{
    return mAllowFds;