Merge "Add isStable in Parcelable interface"
This commit is contained in:
@@ -119,6 +119,20 @@ public interface Parcelable {
|
|||||||
*/
|
*/
|
||||||
public @ContentsFlags int describeContents();
|
public @ContentsFlags int describeContents();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 'Stable' means this parcelable is guaranteed to be stable for multiple years.
|
||||||
|
* It must be guaranteed by setting stability field in aidl_interface,
|
||||||
|
* OR explicitly override this method from @JavaOnlyStableParcelable marked Parcelable.
|
||||||
|
* WARNING: isStable() is only expected to be overridden by auto-generated code,
|
||||||
|
* OR @JavaOnlyStableParcelable marked Parcelable only if there is guaranteed to
|
||||||
|
* be only once copy of the parcelable on the system.
|
||||||
|
* @return true if this parcelable is stable.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
default boolean isStable() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flatten this object in to a Parcel.
|
* Flatten this object in to a Parcel.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user