mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Make CREATOR for parcelable items static
This commit is contained in:
parent
4eb11454bd
commit
64e67d3ce0
2 changed files with 11 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ import java.util.Date;
|
|||
|
||||
public class Media implements Parcelable {
|
||||
|
||||
public Creator<Media> CREATOR = new Creator<Media>() {
|
||||
public static Creator<Media> CREATOR = new Creator<Media>() {
|
||||
public Media createFromParcel(Parcel parcel) {
|
||||
return new Media(parcel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,16 @@ import org.wikimedia.commons.Media;
|
|||
|
||||
public class Contribution extends Media {
|
||||
|
||||
public static Creator<Contribution> CREATOR = new Creator<Contribution>() {
|
||||
public Contribution createFromParcel(Parcel parcel) {
|
||||
return new Contribution(parcel);
|
||||
}
|
||||
|
||||
public Contribution[] newArray(int i) {
|
||||
return new Contribution[0];
|
||||
}
|
||||
};
|
||||
|
||||
// No need to be bitwise - they're mutually exclusive
|
||||
public static final int STATE_COMPLETED = -1;
|
||||
public static final int STATE_FAILED = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue