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

Commit 68a23402 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

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

parents d3ef230c 15feb9b5
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;