diff --git a/core/api/current.txt b/core/api/current.txt index 2e0e6e571b87b..dc1949693802c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -30355,6 +30355,7 @@ package android.os { method public void writeTypedArray(@Nullable T[], int); method public void writeTypedArrayMap(@Nullable android.util.ArrayMap, int); method public void writeTypedList(@Nullable java.util.List); + method public void writeTypedList(@Nullable java.util.List, int); method public void writeTypedObject(@Nullable T, int); method public void writeTypedSparseArray(@Nullable android.util.SparseArray, int); method public void writeValue(@Nullable Object); diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index 08ab73b9dd923..dd81826359410 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -1990,7 +1990,20 @@ public final class Parcel { } /** - * @hide + * Flatten a List containing a particular object type into the parcel, at + * the current dataPosition() and growing dataCapacity() if needed. The + * type of the objects in the list must be one that implements Parcelable. + * Unlike the generic writeList() method, however, only the raw data of the + * objects is written and not their type, so you must use the corresponding + * readTypedList() to unmarshall them. + * + * @param val The list of objects to be written. + * @param parcelableFlags Contextual flags as per + * {@link Parcelable#writeToParcel(Parcel, int) Parcelable.writeToParcel()}. + * + * @see #createTypedArrayList + * @see #readTypedList + * @see Parcelable */ public void writeTypedList(@Nullable List val, int parcelableFlags) { if (val == null) {