summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hao Ke <haok@google.com> 2022-02-09 15:19:54 +0000
committer Hao Ke <haok@google.com> 2022-02-24 13:13:48 +0000
commit66cd477d7725f909f4c595e2b479a2fbaee31960 (patch)
treeeda06dc8132d185c7e114d078fb00caa4e65e29f
parentba28bb57adf01a95f048fe178ed91a895dd13240 (diff)
Update JavaDoc to replace deprecated Parcel read APIs.
Bug: 195622897 Change-Id: I5f6444dcc87ad76bf6f6312eea68891aa07604cb Test: None
-rw-r--r--core/java/android/os/Parcel.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 13d1d96fadc8..eed7571b663d 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -198,7 +198,7 @@ import java.util.function.Supplier;
* The methods to use are {@link #writeFileDescriptor(FileDescriptor)},
* {@link #readFileDescriptor()}.
*
- * <h3>Untyped Containers</h3>
+ * <h3>Parcelable Containers</h3>
*
* <p>A final class of methods are for writing and reading standard Java
* containers of arbitrary types. These all revolve around the
@@ -210,6 +210,19 @@ import java.util.function.Supplier;
* {@link #writeMap(Map)}, {@link #readMap(Map, ClassLoader)},
* {@link #writeSparseArray(SparseArray)},
* {@link #readSparseArray(ClassLoader)}.
+ *
+ * <h3>Restricted Parcelable Containers</h3>
+ *
+ * <p>A final class of methods are for reading standard Java containers of restricted types.
+ * These methods replace methods for reading containers of arbitrary types from previous section
+ * starting from Android {@link Build.VERSION_CODES#TIRAMISU}. The pairing writing methods are
+ * still the same from previous section.
+ * These methods accepts additional {@code clazz} parameters as the required types.
+ * The Restricted Parcelable container methods are {@link #readArray(ClassLoader, Class)},
+ * {@link #readList(List, ClassLoader, Class)},
+ * {@link #readArrayList(ClassLoader, Class)},
+ * {@link #readMap(Map, ClassLoader, Class, Class)},
+ * {@link #readSparseArray(ClassLoader, Class)}.
*/
public final class Parcel {