Cpoy the albumId into the parcel

This commit is contained in:
Christopher Eby 2010-04-14 18:37:48 -05:00
parent 3dfb6e6b6e
commit 0d625e0851

View File

@ -188,6 +188,7 @@ public class Song implements Parcelable {
public Song(Parcel in)
{
id = in.readLong();
albumId = in.readLong();
path = in.readString();
title = in.readString();
album = in.readString();
@ -197,6 +198,7 @@ public class Song implements Parcelable {
public void writeToParcel(Parcel out, int flags)
{
out.writeLong(id);
out.writeLong(albumId);
out.writeString(path);
out.writeString(title);
out.writeString(album);
@ -225,7 +227,7 @@ public class Song implements Parcelable {
ContentResolver res = context.getContentResolver();
Uri uri;
if (albumId < 0)
if (albumId < 1)
uri = ContentUris.withAppendedId(ARTWORK_URI, albumId);
else
uri = Uri.parse("content://media/external/audio/media/" + id + "/albumart");
@ -262,4 +264,4 @@ public class Song implements Parcelable {
return bitmap;
}
}
}