Replaced Serializable with Parcelable everywhere
This commit is contained in:
parent
c5b5460e01
commit
5bdd763248
21 changed files with 413 additions and 175 deletions
|
|
@ -1,13 +1,12 @@
|
|||
package com.kabouzeid.gramophone.model;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public class Album {
|
||||
|
||||
public class Album implements Parcelable {
|
||||
public final int id;
|
||||
public final int artistId;
|
||||
public final String title;
|
||||
|
|
@ -34,47 +33,77 @@ public class Album {
|
|||
year = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Album album = (Album) o;
|
||||
|
||||
if (id != album.id) return false;
|
||||
if (artistId != album.artistId) return false;
|
||||
if (songCount != album.songCount) return false;
|
||||
if (year != album.year) return false;
|
||||
if (title != null ? !title.equals(album.title) : album.title != null) return false;
|
||||
return artistName != null ? artistName.equals(album.artistName) : album.artistName == null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + id;
|
||||
result = prime * result + (title == null ? 0 : title.hashCode());
|
||||
result = prime * result + (artistName == null ? 0 : artistName.hashCode());
|
||||
result = prime * result + songCount;
|
||||
result = prime * result + year;
|
||||
int result = id;
|
||||
result = 31 * result + artistId;
|
||||
result = 31 * result + (title != null ? title.hashCode() : 0);
|
||||
result = 31 * result + (artistName != null ? artistName.hashCode() : 0);
|
||||
result = 31 * result + songCount;
|
||||
result = 31 * result + year;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Album other = (Album) obj;
|
||||
if (id != other.id) {
|
||||
return false;
|
||||
}
|
||||
if (!TextUtils.equals(title, other.title)) {
|
||||
return false;
|
||||
}
|
||||
if (!TextUtils.equals(artistName, other.artistName)) {
|
||||
return false;
|
||||
}
|
||||
if (songCount != other.songCount) {
|
||||
return false;
|
||||
}
|
||||
return year == other.year;
|
||||
public String toString() {
|
||||
return "Album{" +
|
||||
"id=" + id +
|
||||
", artistId=" + artistId +
|
||||
", title='" + title + '\'' +
|
||||
", artistName='" + artistName + '\'' +
|
||||
", songCount=" + songCount +
|
||||
", year=" + year +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return title;
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(this.id);
|
||||
dest.writeInt(this.artistId);
|
||||
dest.writeString(this.title);
|
||||
dest.writeString(this.artistName);
|
||||
dest.writeInt(this.songCount);
|
||||
dest.writeInt(this.year);
|
||||
}
|
||||
|
||||
protected Album(Parcel in) {
|
||||
this.id = in.readInt();
|
||||
this.artistId = in.readInt();
|
||||
this.title = in.readString();
|
||||
this.artistName = in.readString();
|
||||
this.songCount = in.readInt();
|
||||
this.year = in.readInt();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<Album> CREATOR = new Parcelable.Creator<Album>() {
|
||||
public Album createFromParcel(Parcel source) {
|
||||
return new Album(source);
|
||||
}
|
||||
|
||||
public Album[] newArray(int size) {
|
||||
return new Album[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
package com.kabouzeid.gramophone.model;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public class Artist {
|
||||
public class Artist implements Parcelable {
|
||||
public final int id;
|
||||
public final String name;
|
||||
public final int albumCount;
|
||||
|
|
@ -26,43 +26,67 @@ public class Artist {
|
|||
albumCount = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Artist artist = (Artist) o;
|
||||
|
||||
if (id != artist.id) return false;
|
||||
if (albumCount != artist.albumCount) return false;
|
||||
if (songCount != artist.songCount) return false;
|
||||
return name != null ? name.equals(artist.name) : artist.name == null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + albumCount;
|
||||
result = prime * result + id;
|
||||
result = prime * result + (name == null ? 0 : name.hashCode());
|
||||
result = prime * result + songCount;
|
||||
int result = id;
|
||||
result = 31 * result + (name != null ? name.hashCode() : 0);
|
||||
result = 31 * result + albumCount;
|
||||
result = 31 * result + songCount;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Artist other = (Artist) obj;
|
||||
if (albumCount != other.albumCount) {
|
||||
return false;
|
||||
}
|
||||
if (id != other.id) {
|
||||
return false;
|
||||
}
|
||||
if (!TextUtils.equals(name, other.name)) {
|
||||
return false;
|
||||
}
|
||||
return songCount == other.songCount;
|
||||
public String toString() {
|
||||
return "Artist{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
", albumCount=" + albumCount +
|
||||
", songCount=" + songCount +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(this.id);
|
||||
dest.writeString(this.name);
|
||||
dest.writeInt(this.albumCount);
|
||||
dest.writeInt(this.songCount);
|
||||
}
|
||||
|
||||
protected Artist(Parcel in) {
|
||||
this.id = in.readInt();
|
||||
this.name = in.readString();
|
||||
this.albumCount = in.readInt();
|
||||
this.songCount = in.readInt();
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<Artist> CREATOR = new Parcelable.Creator<Artist>() {
|
||||
public Artist createFromParcel(Parcel source) {
|
||||
return new Artist(source);
|
||||
}
|
||||
|
||||
public Artist[] newArray(int size) {
|
||||
return new Artist[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,12 @@
|
|||
package com.kabouzeid.gramophone.model;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public class Playlist implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3013703495354856981L;
|
||||
|
||||
public class Playlist implements Parcelable {
|
||||
public final int id;
|
||||
public final String name;
|
||||
|
||||
|
|
@ -25,35 +20,48 @@ public class Playlist implements Serializable {
|
|||
this.name = "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Playlist playlist = (Playlist) o;
|
||||
|
||||
if (id != playlist.id) return false;
|
||||
return name != null ? name.equals(playlist.name) : playlist.name == null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + id;
|
||||
result = prime * result + (name == null ? 0 : name.hashCode());
|
||||
int result = id;
|
||||
result = 31 * result + (name != null ? name.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Playlist other = (Playlist) obj;
|
||||
if (id != other.id) {
|
||||
return false;
|
||||
}
|
||||
return TextUtils.equals(name, other.name);
|
||||
public String toString() {
|
||||
return "Playlist{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(this.id);
|
||||
dest.writeString(this.name);
|
||||
}
|
||||
|
||||
protected Playlist(Parcel in) {
|
||||
this.id = in.readInt();
|
||||
this.name = in.readString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.kabouzeid.gramophone.model;
|
||||
|
||||
public class PlaylistSong extends Song {
|
||||
import android.os.Parcel;
|
||||
|
||||
private static final long serialVersionUID = 1098600801627571043L;
|
||||
public class PlaylistSong extends Song {
|
||||
|
||||
public final int playlistId;
|
||||
public final int idInPlayList;
|
||||
|
|
@ -20,21 +20,62 @@ public class PlaylistSong extends Song {
|
|||
idInPlayList = -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (!super.equals(o)) return false;
|
||||
|
||||
PlaylistSong that = (PlaylistSong) o;
|
||||
|
||||
if (playlistId != that.playlistId) return false;
|
||||
return idInPlayList == that.idInPlayList;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + playlistId;
|
||||
result = prime * result + idInPlayList;
|
||||
result = 31 * result + playlistId;
|
||||
result = 31 * result + idInPlayList;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (super.equals(obj)) {
|
||||
final PlaylistSong other = (PlaylistSong) obj;
|
||||
return playlistId == other.playlistId && idInPlayList == other.idInPlayList;
|
||||
}
|
||||
return false;
|
||||
public String toString() {
|
||||
return super.toString() +
|
||||
"PlaylistSong{" +
|
||||
"playlistId=" + playlistId +
|
||||
", idInPlayList=" + idInPlayList +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeInt(this.playlistId);
|
||||
dest.writeInt(this.idInPlayList);
|
||||
}
|
||||
|
||||
protected PlaylistSong(Parcel in) {
|
||||
super(in);
|
||||
this.playlistId = in.readInt();
|
||||
this.idInPlayList = in.readInt();
|
||||
}
|
||||
|
||||
public static final Creator<PlaylistSong> CREATOR = new Creator<PlaylistSong>() {
|
||||
public PlaylistSong createFromParcel(Parcel source) {
|
||||
return new PlaylistSong(source);
|
||||
}
|
||||
|
||||
public PlaylistSong[] newArray(int size) {
|
||||
return new PlaylistSong[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,12 @@
|
|||
package com.kabouzeid.gramophone.model;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public class Song implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3720703366054566981L;
|
||||
|
||||
public class Song implements Parcelable {
|
||||
public final int id;
|
||||
public final int albumId;
|
||||
public final int artistId;
|
||||
|
|
@ -47,47 +42,94 @@ public class Song implements Serializable {
|
|||
this.data = "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Song song = (Song) o;
|
||||
|
||||
if (id != song.id) return false;
|
||||
if (albumId != song.albumId) return false;
|
||||
if (artistId != song.artistId) return false;
|
||||
if (duration != song.duration) return false;
|
||||
if (trackNumber != song.trackNumber) return false;
|
||||
if (title != null ? !title.equals(song.title) : song.title != null) return false;
|
||||
if (artistName != null ? !artistName.equals(song.artistName) : song.artistName != null)
|
||||
return false;
|
||||
if (albumName != null ? !albumName.equals(song.albumName) : song.albumName != null)
|
||||
return false;
|
||||
return data != null ? data.equals(song.data) : song.data == null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (albumName == null ? 0 : albumName.hashCode());
|
||||
result = prime * result + (artistName == null ? 0 : artistName.hashCode());
|
||||
result = prime * result + (int) duration;
|
||||
result = prime * result + id;
|
||||
result = prime * result + (title == null ? 0 : title.hashCode());
|
||||
int result = id;
|
||||
result = 31 * result + albumId;
|
||||
result = 31 * result + artistId;
|
||||
result = 31 * result + (title != null ? title.hashCode() : 0);
|
||||
result = 31 * result + (artistName != null ? artistName.hashCode() : 0);
|
||||
result = 31 * result + (albumName != null ? albumName.hashCode() : 0);
|
||||
result = 31 * result + (int) (duration ^ (duration >>> 32));
|
||||
result = 31 * result + trackNumber;
|
||||
result = 31 * result + (data != null ? data.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final Song other = (Song) obj;
|
||||
if (id != other.id) {
|
||||
return false;
|
||||
}
|
||||
if (!TextUtils.equals(albumName, other.albumName)) {
|
||||
return false;
|
||||
}
|
||||
if (!TextUtils.equals(artistName, other.artistName)) {
|
||||
return false;
|
||||
}
|
||||
if (duration != other.duration) {
|
||||
return false;
|
||||
}
|
||||
return TextUtils.equals(title, other.title);
|
||||
public String toString() {
|
||||
return "Song{" +
|
||||
"id=" + id +
|
||||
", albumId=" + albumId +
|
||||
", artistId=" + artistId +
|
||||
", title='" + title + '\'' +
|
||||
", artistName='" + artistName + '\'' +
|
||||
", albumName='" + albumName + '\'' +
|
||||
", duration=" + duration +
|
||||
", trackNumber=" + trackNumber +
|
||||
", data='" + data + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return title;
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(this.id);
|
||||
dest.writeInt(this.albumId);
|
||||
dest.writeInt(this.artistId);
|
||||
dest.writeString(this.title);
|
||||
dest.writeString(this.artistName);
|
||||
dest.writeString(this.albumName);
|
||||
dest.writeLong(this.duration);
|
||||
dest.writeInt(this.trackNumber);
|
||||
dest.writeString(this.data);
|
||||
}
|
||||
|
||||
protected Song(Parcel in) {
|
||||
this.id = in.readInt();
|
||||
this.albumId = in.readInt();
|
||||
this.artistId = in.readInt();
|
||||
this.title = in.readString();
|
||||
this.artistName = in.readString();
|
||||
this.albumName = in.readString();
|
||||
this.duration = in.readLong();
|
||||
this.trackNumber = in.readInt();
|
||||
this.data = in.readString();
|
||||
}
|
||||
|
||||
public static final Creator<Song> CREATOR = new Creator<Song>() {
|
||||
public Song createFromParcel(Parcel source) {
|
||||
return new Song(source);
|
||||
}
|
||||
|
||||
public Song[] newArray(int size) {
|
||||
return new Song[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kabouzeid.gramophone.model.smartplaylist;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
|
|
@ -14,8 +15,6 @@ import java.util.ArrayList;
|
|||
* @author Karim Abou Zeid (kabouzeid)
|
||||
*/
|
||||
public abstract class AbsSmartPlaylist extends Playlist {
|
||||
private static final long serialVersionUID = 3013701295356403681L;
|
||||
|
||||
@DrawableRes
|
||||
public final int iconRes;
|
||||
|
||||
|
|
@ -52,4 +51,21 @@ public abstract class AbsSmartPlaylist extends Playlist {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
dest.writeInt(this.iconRes);
|
||||
}
|
||||
|
||||
protected AbsSmartPlaylist(Parcel in) {
|
||||
super(in);
|
||||
this.iconRes = in.readInt();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kabouzeid.gramophone.model.smartplaylist;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.kabouzeid.gramophone.R;
|
||||
|
|
@ -29,4 +30,29 @@ public class HistoryPlaylist extends AbsSmartPlaylist {
|
|||
public void clear(@NonNull Context context) {
|
||||
HistoryStore.getInstance(context).clear();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
}
|
||||
|
||||
protected HistoryPlaylist(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<HistoryPlaylist> CREATOR = new Creator<HistoryPlaylist>() {
|
||||
public HistoryPlaylist createFromParcel(Parcel source) {
|
||||
return new HistoryPlaylist(source);
|
||||
}
|
||||
|
||||
public HistoryPlaylist[] newArray(int size) {
|
||||
return new HistoryPlaylist[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kabouzeid.gramophone.model.smartplaylist;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.kabouzeid.gramophone.R;
|
||||
|
|
@ -29,4 +30,29 @@ public class LastAddedPlaylist extends AbsSmartPlaylist {
|
|||
public void clear(@NonNull Context context) {
|
||||
PreferenceUtil.getInstance(context).setLastAddedCutoffTimestamp(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
}
|
||||
|
||||
protected LastAddedPlaylist(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<LastAddedPlaylist> CREATOR = new Creator<LastAddedPlaylist>() {
|
||||
public LastAddedPlaylist createFromParcel(Parcel source) {
|
||||
return new LastAddedPlaylist(source);
|
||||
}
|
||||
|
||||
public LastAddedPlaylist[] newArray(int size) {
|
||||
return new LastAddedPlaylist[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.kabouzeid.gramophone.model.smartplaylist;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import com.kabouzeid.gramophone.R;
|
||||
|
|
@ -29,4 +30,29 @@ public class MyTopTracksPlaylist extends AbsSmartPlaylist {
|
|||
public void clear(@NonNull Context context) {
|
||||
SongPlayCountStore.getInstance(context).clear();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
super.writeToParcel(dest, flags);
|
||||
}
|
||||
|
||||
protected MyTopTracksPlaylist(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<MyTopTracksPlaylist> CREATOR = new Creator<MyTopTracksPlaylist>() {
|
||||
public MyTopTracksPlaylist createFromParcel(Parcel source) {
|
||||
return new MyTopTracksPlaylist(source);
|
||||
}
|
||||
|
||||
public MyTopTracksPlaylist[] newArray(int size) {
|
||||
return new MyTopTracksPlaylist[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue