Skip to content

Commit

Permalink
Add missing CREATOR, remove unnecessary overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Rummler committed Jan 6, 2016
1 parent ab899bc commit 83bec9d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,6 @@ public int exit_code() {
return Integer.parseInt(fields[51]);
}

@Override public int describeContents() {
return 0;
}

@Override public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeStringArray(fields);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ public long getResidentSetSize() {
return Long.parseLong(fields[1]) * 1024;
}

@Override public int describeContents() {
return 0;
}

@Override public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeStringArray(this.fields);
Expand All @@ -96,4 +92,5 @@ public long getResidentSetSize() {
return new Statm[size];
}
};

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package com.jaredrummler.android.processes.models;

import android.os.Parcel;

import java.io.IOException;

/**
Expand Down Expand Up @@ -146,6 +148,10 @@ private Status(String path) throws IOException {
super(path);
}

private Status(Parcel in) {
super(in);
}

/**
* Get the value of one of the fields.
*
Expand Down Expand Up @@ -185,4 +191,15 @@ public int getGid() {
}
}

public static final Creator<Status> CREATOR = new Creator<Status>() {

@Override public Status createFromParcel(Parcel source) {
return new Status(source);
}

@Override public Status[] newArray(int size) {
return new Status[size];
}
};

}

0 comments on commit 83bec9d

Please sign in to comment.