Skip to content

Commit e904b34

Browse files
committed
Merge pull request #90 from mattiamaestrini/tracksimple_parcelable_fix
Fixed TrackSimple parcelable
2 parents 9f3d21c + e4ec369 commit e904b34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spotify-api/src/main/java/kaaes/spotify/webapi/android/models/TrackSimple.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void writeToParcel(Parcel dest, int flags) {
3737
dest.writeParcelable(this.linked_from, 0);
3838
dest.writeInt(this.disc_number);
3939
dest.writeLong(this.duration_ms);
40-
dest.writeByte(explicit ? (byte) 1 : (byte) 0);
40+
dest.writeValue(this.explicit);
4141
dest.writeMap(this.external_urls);
4242
dest.writeString(this.href);
4343
dest.writeString(this.id);
@@ -58,7 +58,7 @@ protected TrackSimple(Parcel in) {
5858
this.linked_from = in.readParcelable(LinkedTrack.class.getClassLoader());
5959
this.disc_number = in.readInt();
6060
this.duration_ms = in.readLong();
61-
this.explicit = in.readByte() != 0;
61+
this.explicit = (Boolean) in.readValue(Boolean.class.getClassLoader());
6262
this.external_urls = in.readHashMap(Map.class.getClassLoader());
6363
this.href = in.readString();
6464
this.id = in.readString();

0 commit comments

Comments
 (0)