mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-26 09:02:34 -06:00
73 lines
2.5 KiB
Java
73 lines
2.5 KiB
Java
package com.google.android.exoplayer2;
|
|
|
|
import android.os.Bundle;
|
|
import com.google.android.exoplayer2.Bundleable;
|
|
import com.google.android.exoplayer2.util.Assertions;
|
|
import com.google.android.exoplayer2.util.Util;
|
|
import com.google.common.base.Objects;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class ThumbRating extends Rating {
|
|
private static final int TYPE = 3;
|
|
private final boolean isThumbsUp;
|
|
private final boolean rated;
|
|
private static final String FIELD_RATED = Util.intToStringMaxRadix(1);
|
|
private static final String FIELD_IS_THUMBS_UP = Util.intToStringMaxRadix(2);
|
|
public static final Bundleable.Creator<ThumbRating> CREATOR = new Bundleable.Creator() { // from class: com.google.android.exoplayer2.ThumbRating$$ExternalSyntheticLambda0
|
|
@Override // com.google.android.exoplayer2.Bundleable.Creator
|
|
public final Bundleable fromBundle(Bundle bundle) {
|
|
ThumbRating fromBundle;
|
|
fromBundle = ThumbRating.fromBundle(bundle);
|
|
return fromBundle;
|
|
}
|
|
};
|
|
|
|
@Override // com.google.android.exoplayer2.Rating
|
|
public boolean isRated() {
|
|
return this.rated;
|
|
}
|
|
|
|
public boolean isThumbsUp() {
|
|
return this.isThumbsUp;
|
|
}
|
|
|
|
public ThumbRating() {
|
|
this.rated = false;
|
|
this.isThumbsUp = false;
|
|
}
|
|
|
|
public ThumbRating(boolean z) {
|
|
this.rated = true;
|
|
this.isThumbsUp = z;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return Objects.hashCode(Boolean.valueOf(this.rated), Boolean.valueOf(this.isThumbsUp));
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (!(obj instanceof ThumbRating)) {
|
|
return false;
|
|
}
|
|
ThumbRating thumbRating = (ThumbRating) obj;
|
|
return this.isThumbsUp == thumbRating.isThumbsUp && this.rated == thumbRating.rated;
|
|
}
|
|
|
|
@Override // com.google.android.exoplayer2.Bundleable
|
|
public Bundle toBundle() {
|
|
Bundle bundle = new Bundle();
|
|
bundle.putInt(FIELD_RATING_TYPE, 3);
|
|
bundle.putBoolean(FIELD_RATED, this.rated);
|
|
bundle.putBoolean(FIELD_IS_THUMBS_UP, this.isThumbsUp);
|
|
return bundle;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static ThumbRating fromBundle(Bundle bundle) {
|
|
Assertions.checkArgument(bundle.getInt(FIELD_RATING_TYPE, -1) == 3);
|
|
if (bundle.getBoolean(FIELD_RATED, false)) {
|
|
return new ThumbRating(bundle.getBoolean(FIELD_IS_THUMBS_UP, false));
|
|
}
|
|
return new ThumbRating();
|
|
}
|
|
}
|