From cdd0d968cff6a0f499aaf5c22feb6cafb129376a Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 10 Nov 2015 18:32:43 +0100 Subject: [PATCH] Provide Parcelable.Creator object called CREATOR --- .../core/gpoddernet/model/GpodnetTag.java | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java index cd865731b..ee13bef25 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java +++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetTag.java @@ -20,11 +20,10 @@ public class GpodnetTag implements Parcelable { this.usage = usage; } - public static GpodnetTag createFromParcel(Parcel in) { - final String title = in.readString(); - final String tag = in.readString(); - final int usage = in.readInt(); - return new GpodnetTag(title, tag, usage); + protected GpodnetTag(Parcel in) { + title = in.readString(); + tag = in.readString(); + usage = in.readInt(); } @Override @@ -56,5 +55,16 @@ public class GpodnetTag implements Parcelable { dest.writeInt(usage); } + public static final Creator CREATOR = new Creator() { + @Override + public GpodnetTag createFromParcel(Parcel in) { + return new GpodnetTag(in); + } + + @Override + public GpodnetTag[] newArray(int size) { + return new GpodnetTag[size]; + } + }; }