summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2020-07-23 01:22:28 +0000
committer Steven Moreland <smoreland@google.com> 2020-07-23 17:57:59 +0000
commit515aa303bd56076e75f1addd8af8b1a0108c20a3 (patch)
treec19806b184a622301de0bff8d57fac35895b32b1
parentea8305102a6cdd1b2cf89b1f020391bd19f71244 (diff)
libbinder: Parcelable isStable->getStability
In preparation for APEX stability. Bug: 139325195 Test: AIDL's run_integration_test.py Change-Id: Ie0815f48c5ae0cb542b6282a4daaa06f2a0cfe8e
-rw-r--r--libs/binder/include/binder/Parcelable.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/libs/binder/include/binder/Parcelable.h b/libs/binder/include/binder/Parcelable.h
index c1132795de..83c2f1991d 100644
--- a/libs/binder/include/binder/Parcelable.h
+++ b/libs/binder/include/binder/Parcelable.h
@@ -53,11 +53,20 @@ public:
// Returns android::OK on success and an appropriate error otherwise.
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.
- // WARNING: isStable() is only expected to be overridden by auto-generated code.
- // Returns true if this parcelable is stable.
- virtual bool isStable() const { return false; }
+ // WARNING: getStability() is only expected to be overridden by auto-generated
+ // code. Returns true if this parcelable is stable.
+ virtual Stability getStability() const { return Stability::STABILITY_LOCAL; }
}; // class Parcelable
#if defined(__clang__)