| package com.android.onemedia.playback; |
| |
| import android.os.Bundle; |
| import android.os.Parcel; |
| import android.os.Parcelable; |
| import android.support.v7.media.MediaItemMetadata; |
| |
| /** |
| * TODO: Insert description here. (generated by epastern) |
| */ |
| public class MediaItem implements Parcelable { |
| private Bundle mBundle; |
| |
| public MediaItem() { |
| |
| } |
| |
| private MediaItem(Parcel in) { |
| mBundle = in.readBundle(); |
| } |
| |
| public String getTitle() { |
| return mBundle.getString(MediaItemMetadata.KEY_TITLE); |
| } |
| |
| public String getArtist() { |
| return mBundle.getString(MediaItemMetadata.KEY_ALBUM_ARTIST); |
| } |
| |
| /* (non-Javadoc) |
| * @see android.os.Parcelable#describeContents() |
| */ |
| @Override |
| public int describeContents() { |
| // TODO(epastern): Auto-generated method stub |
| return 0; |
| } |
| |
| /* |
| * (non-Javadoc) |
| * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int) |
| */ |
| @Override |
| public void writeToParcel(Parcel dest, int flags) { |
| dest.writeBundle(mBundle); |
| } |
| |
| public static final Parcelable.Creator<MediaItem> CREATOR |
| = new Parcelable.Creator<MediaItem>() { |
| public MediaItem createFromParcel(Parcel in) { |
| return new MediaItem(in); |
| } |
| |
| public MediaItem[] newArray(int size) { |
| return new MediaItem[size]; |
| } |
| }; |
| |
| } |