-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
Consider this example class:
public class Example {
private Example[] array;
}
After generating the parcelable code, we get:
public class Example implements Parcelable {
private Example[] array;
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeParcelable(this.array, flags);
}
public Example() {
}
protected Example(Parcel in) {
this.array = in.readParcelable(Example[].class.getClassLoader());
}
public static final Parcelable.Creator<Example> CREATOR = new Parcelable.Creator<Example>() {
@Override
public Example createFromParcel(Parcel source) {
return new Example(source);
}
@Override
public Example[] newArray(int size) {
return new Example[size];
}
};
}
writeParcelable
should be writeTypedArray
readParcelable
should be createTypedArray
This issue seams to be in ParcelableSerializerFactory.getSerializer()
where the psiType
of the class we're currently working on has not yet implemented the Parcelable
interface.
Metadata
Metadata
Assignees
Labels
No labels