2021-06-27 20:44:35 +00:00
|
|
|
package android.support.v4.media;
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint;
|
|
|
|
import android.os.Parcel;
|
|
|
|
import android.os.Parcelable;
|
|
|
|
@SuppressLint({"BanParcelableUsage"})
|
|
|
|
public final class RatingCompat implements Parcelable {
|
|
|
|
public static final Parcelable.Creator<RatingCompat> CREATOR = new a();
|
|
|
|
public final int i;
|
|
|
|
public final float j;
|
|
|
|
|
|
|
|
public class a implements Parcelable.Creator<RatingCompat> {
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
@Override // android.os.Parcelable.Creator
|
|
|
|
public RatingCompat createFromParcel(Parcel parcel) {
|
|
|
|
return new RatingCompat(parcel.readInt(), parcel.readFloat());
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object[]' to match base method */
|
|
|
|
@Override // android.os.Parcelable.Creator
|
|
|
|
public RatingCompat[] newArray(int i) {
|
|
|
|
return new RatingCompat[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public RatingCompat(int i, float f) {
|
|
|
|
this.i = i;
|
|
|
|
this.j = f;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.os.Parcelable
|
|
|
|
public int describeContents() {
|
|
|
|
return this.i;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.lang.Object
|
|
|
|
public String toString() {
|
2021-11-05 06:48:17 +00:00
|
|
|
StringBuilder R = c.d.b.a.a.R("Rating:style=");
|
|
|
|
R.append(this.i);
|
|
|
|
R.append(" rating=");
|
2021-06-27 20:44:35 +00:00
|
|
|
float f = this.j;
|
2021-11-05 06:48:17 +00:00
|
|
|
R.append(f < 0.0f ? "unrated" : String.valueOf(f));
|
|
|
|
return R.toString();
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.os.Parcelable
|
|
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
|
|
parcel.writeInt(this.i);
|
|
|
|
parcel.writeFloat(this.j);
|
|
|
|
}
|
|
|
|
}
|