Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8919f07 authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Fix code example in Parcelable javadoc

DOCS ONLY

The code example for android.os.Parcelable contained several errors:

- There was no type parameter for Parcelable.Creator (due to unescaped
< > in the javadoc comment).

- There was no implementation of describeContents().

- The semicolon after the CREATOR declaration was missing.

This change fixes all of the above.

Fixes issue http://b/issue?id=2221120

Change-Id: Icaf932d079573cc7699f1caa643aac49e85ccca0
parent d376d240
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -29,12 +29,16 @@ package android.os;
 * public class MyParcelable implements Parcelable {
 *     private int mData;
 *
 *     public int describeContents() {
 *         return 0;
 *     }
 *
 *     public void writeToParcel(Parcel out, int flags) {
 *         out.writeInt(mData);
 *     }
 *
 *     public static final Parcelable.Creator<MyParcelable> CREATOR
 *             = new Parcelable.Creator<MyParcelable>() {
 *     public static final Parcelable.Creator&lt;MyParcelable&gt; CREATOR
 *             = new Parcelable.Creator&lt;MyParcelable&gt;() {
 *         public MyParcelable createFromParcel(Parcel in) {
 *             return new MyParcelable(in);
 *         }
@@ -42,7 +46,7 @@ package android.os;
 *         public MyParcelable[] newArray(int size) {
 *             return new MyParcelable[size];
 *         }
 *     }
 *     };
 *     
 *     private MyParcelable(Parcel in) {
 *         mData = in.readInt();