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

Commit 6a574335 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge changes from topic "aidl-ndk-comparison" am: 370181de am: 44900ea5

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1519809

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic519f71ebff070b2a63936ca40d8139c44447a30
parents 7b0508a9 44900ea5
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -114,6 +114,13 @@ class SpAIBinder {
     */
    AIBinder** getR() { return &mBinder; }

    bool operator!=(const SpAIBinder& rhs) const { return get() != rhs.get(); }
    bool operator<(const SpAIBinder& rhs) const { return get() < rhs.get(); }
    bool operator<=(const SpAIBinder& rhs) const { return get() <= rhs.get(); }
    bool operator==(const SpAIBinder& rhs) const { return get() == rhs.get(); }
    bool operator>(const SpAIBinder& rhs) const { return get() > rhs.get(); }
    bool operator>=(const SpAIBinder& rhs) const { return get() >= rhs.get(); }

   private:
    AIBinder* mBinder = nullptr;
};
@@ -200,6 +207,13 @@ class ScopedAParcel : public impl::ScopedAResource<AParcel*, void, AParcel_delet
    ~ScopedAParcel() {}
    ScopedAParcel(ScopedAParcel&&) = default;
    ScopedAParcel& operator=(ScopedAParcel&&) = default;

    bool operator!=(const ScopedAParcel& rhs) const { return get() != rhs.get(); }
    bool operator<(const ScopedAParcel& rhs) const { return get() < rhs.get(); }
    bool operator<=(const ScopedAParcel& rhs) const { return get() <= rhs.get(); }
    bool operator==(const ScopedAParcel& rhs) const { return get() == rhs.get(); }
    bool operator>(const ScopedAParcel& rhs) const { return get() > rhs.get(); }
    bool operator>=(const ScopedAParcel& rhs) const { return get() >= rhs.get(); }
};

/**
@@ -323,6 +337,13 @@ class ScopedFileDescriptor : public impl::ScopedAResource<int, int, close, -1> {
    ~ScopedFileDescriptor() {}
    ScopedFileDescriptor(ScopedFileDescriptor&&) = default;
    ScopedFileDescriptor& operator=(ScopedFileDescriptor&&) = default;

    bool operator!=(const ScopedFileDescriptor& rhs) const { return get() != rhs.get(); }
    bool operator<(const ScopedFileDescriptor& rhs) const { return get() < rhs.get(); }
    bool operator<=(const ScopedFileDescriptor& rhs) const { return get() <= rhs.get(); }
    bool operator==(const ScopedFileDescriptor& rhs) const { return get() == rhs.get(); }
    bool operator>(const ScopedFileDescriptor& rhs) const { return get() > rhs.get(); }
    bool operator>=(const ScopedFileDescriptor& rhs) const { return get() >= rhs.get(); }
};

}  // namespace ndk
+19 −0
Original line number Diff line number Diff line
@@ -114,6 +114,25 @@ class AParcelableHolder {

    void reset() { AParcel_reset(mParcel.get()); }

    inline bool operator!=(const AParcelableHolder& rhs) const {
        return std::tie(mParcel, mStability) != std::tie(rhs.mParcel, rhs.mStability);
    }
    inline bool operator<(const AParcelableHolder& rhs) const {
        return std::tie(mParcel, mStability) < std::tie(rhs.mParcel, rhs.mStability);
    }
    inline bool operator<=(const AParcelableHolder& rhs) const {
        return std::tie(mParcel, mStability) <= std::tie(rhs.mParcel, rhs.mStability);
    }
    inline bool operator==(const AParcelableHolder& rhs) const {
        return std::tie(mParcel, mStability) == std::tie(rhs.mParcel, rhs.mStability);
    }
    inline bool operator>(const AParcelableHolder& rhs) const {
        return std::tie(mParcel, mStability) > std::tie(rhs.mParcel, rhs.mStability);
    }
    inline bool operator>=(const AParcelableHolder& rhs) const {
        return std::tie(mParcel, mStability) >= std::tie(rhs.mParcel, rhs.mStability);
    }

   private:
    mutable ndk::ScopedAParcel mParcel;
    parcelable_stability_t mStability;