alexandroid/decompiled/jadx/sources/com/google/android/exoplayer2/source/TrackGroupArray.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

92 lines
3 KiB
Java

package com.google.android.exoplayer2.source;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.Nullable;
import java.util.Arrays;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
public final class TrackGroupArray implements Parcelable {
private int hashCode;
public final int length;
private final TrackGroup[] trackGroups;
public static final TrackGroupArray EMPTY = new TrackGroupArray(new TrackGroup[0]);
public static final Parcelable.Creator<TrackGroupArray> CREATOR = new Parcelable.Creator<TrackGroupArray>() { // from class: com.google.android.exoplayer2.source.TrackGroupArray.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public TrackGroupArray createFromParcel(Parcel parcel) {
return new TrackGroupArray(parcel);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public TrackGroupArray[] newArray(int i) {
return new TrackGroupArray[i];
}
};
public TrackGroupArray(Parcel parcel) {
int readInt = parcel.readInt();
this.length = readInt;
this.trackGroups = new TrackGroup[readInt];
for (int i = 0; i < this.length; i++) {
this.trackGroups[i] = (TrackGroup) parcel.readParcelable(TrackGroup.class.getClassLoader());
}
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (obj != null && TrackGroupArray.class == obj.getClass()) {
TrackGroupArray trackGroupArray = (TrackGroupArray) obj;
if (this.length == trackGroupArray.length && Arrays.equals(this.trackGroups, trackGroupArray.trackGroups)) {
return true;
}
}
return false;
}
public TrackGroup get(int i) {
return this.trackGroups[i];
}
public int hashCode() {
if (this.hashCode == 0) {
this.hashCode = Arrays.hashCode(this.trackGroups);
}
return this.hashCode;
}
public int indexOf(TrackGroup trackGroup) {
for (int i = 0; i < this.length; i++) {
if (this.trackGroups[i] == trackGroup) {
return i;
}
}
return -1;
}
public boolean isEmpty() {
return this.length == 0;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.length);
for (int i2 = 0; i2 < this.length; i2++) {
parcel.writeParcelable(this.trackGroups[i2], 0);
}
}
public TrackGroupArray(TrackGroup... trackGroupArr) {
this.trackGroups = trackGroupArr;
this.length = trackGroupArr.length;
}
}