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

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

Merge "libbinder: Parcelable isStable->getStability" am: 09f7bc11

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

Change-Id: I2827a33e39d989ca3dc64a91c4fca86dc72c2c47
parents 9cc64273 09f7bc11
Loading
Loading
Loading
Loading
+13 −4
Original line number Original line Diff line number Diff line
@@ -53,11 +53,20 @@ public:
    // Returns android::OK on success and an appropriate error otherwise.
    // Returns android::OK on success and an appropriate error otherwise.
    virtual status_t readFromParcel(const Parcel* parcel) = 0;
    virtual status_t readFromParcel(const Parcel* parcel) = 0;


    // 'Stable' means this parcelable is guaranteed to be stable for multiple years.
    // WARNING: for use by auto-generated code only (AIDL). Should not be used
    // manually, or there is a risk of breaking CTS, GTS, VTS, or CTS-on-GSI
    // tests.
    enum class Stability {
        STABILITY_LOCAL,
        STABILITY_VINTF, // corresponds to @VintfStability
    };

    // 'Stable' means this parcelable is guaranteed to be stable for multiple
    // years.
    // It must be guaranteed by setting stability field in aidl_interface.
    // It must be guaranteed by setting stability field in aidl_interface.
    // WARNING: isStable() is only expected to be overridden by auto-generated code.
    // WARNING: getStability() is only expected to be overridden by auto-generated
    // Returns true if this parcelable is stable.
    // code. Returns true if this parcelable is stable.
    virtual bool isStable() const { return false; }
    virtual Stability getStability() const { return Stability::STABILITY_LOCAL; }
};  // class Parcelable
};  // class Parcelable


#if defined(__clang__)
#if defined(__clang__)