Merge "Updated MotionEvent to use Transform"
diff --git a/include/input/Flags.h b/include/input/Flags.h
index f43829f..4ad9056 100644
--- a/include/input/Flags.h
+++ b/include/input/Flags.h
@@ -68,10 +68,10 @@
template <typename F, typename T, T... I>
constexpr auto generate_flag_values(std::integer_sequence<T, I...> seq) {
- constexpr int count = seq.size();
+ constexpr size_t count = seq.size();
std::array<F, count> values{};
- for (int i = 0, v = 0; v < count; ++i) {
+ for (size_t i = 0, v = 0; v < count; ++i) {
values[v++] = static_cast<F>(T{1} << i);
}
diff --git a/libs/binder/include/binder/Parcelable.h b/libs/binder/include/binder/Parcelable.h
index c113279..83c2f19 100644
--- a/libs/binder/include/binder/Parcelable.h
+++ b/libs/binder/include/binder/Parcelable.h
@@ -53,11 +53,20 @@
// 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__)