360 Wi-Fi v1.0.1版本的 MD5 值为:53dc85b63eb655b13344ce30ddaccae2
以下内容为反编译后的 LIliIliLL.java 源代码,内容仅作参考
package iLii;
import Iiill.LLIIliLLlIL;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.util.Pair;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.TextureView;
import ilILLiIiiiLL.IililiIiIlliL;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.TimeoutException;
public final class LIliIliLL extends iLLlLiLLlill implements LLllLLIiiIIlliI {
public static final int IliILIi = 0;
public final L IILiliI;
public AudioTrack IIiLILiLLiIlIiI;
public Object IIlLiL;
public final lLIlLl IIll;
public iiIilillliI ILIIiiLIiiLiL;
public boolean ILIlilILIliLiLl;
public final CopyOnWriteArraySet ILiIiliL;
public final IIlILIL IiILLLILLilLl;
public final iiliiiLliIL.liLILIIiILI IiiLIIlLiLLlLL;
public final iiIL.LiLIllLIiilL IilIL = new iiIL.LiLIllLIiilL(2);
public final iLIlILIilLiii.i Iili;
public final IiiilI IiliIiIil;
public int IliILllLiiLiIi;
public final ILIlIiLiilIlII IllLLLIil;
public final IiiIIillilIiI IllLl;
public final iiliiiLliIL.ILliiILllillL LIiIl;
public final LiLlLllLIIIIlli LLIilI;
public boolean LLlIiIILLiLli;
public liiIlIIiLll LLlllILiLL;
public final LlIIlLiiIiilL.LLllLLIiiIIlliI Liil;
public final lIilLiLLLLiiiL.Il LlIIiIiIII;
public LIiiLi LlILiIlIILl;
public long LlIlIiliLIIIili;
public final ArrayList LlllL;
public int f3974i;
public int iIl;
public boolean iIliLiilIIlilil;
public int iLLILLiIIl;
public iLLLLiiIi.LliIILliliil iLLiLlllLLi;
public TextureView iLiliilI;
public final lLIIiiLiIiii ii;
public final int iiIiIiIILli;
public final boolean f3975iiL;
public final LlIIlLiiIiilL.iiiLLlLl iiLIIlIILiILilI;
public final llLiiILlllII[] iiiIil;
public final boolean iiiilIllLllLll;
public final LlIIlLiiIiilL.ILIlIiLiilIlII iiilLllli;
public int il;
public SurfaceHolder ilLLLiILLl;
public final Looper illLlLIlllLILL;
public final Il f3976l;
public float f3977lI;
public final IililiIiIlliL lILLilLiLLilL;
public iIILlILIlil lILl;
public final Context lIlILilLLLlIi;
public final IililiIiIlliL lLLIIillILliIIL;
public final liiIlIIiLll f3978lLi;
public LIiiLi lLlII;
public Surface lLliLll;
public boolean lilLLLliliiLI;
public final iiIlllLIi liliiiiLliIiLI;
public int lliIii;
public final long llii;
public List lllIL;
public final LLIIliLLlIL lllLL;
public final int llliIL;
static {
iillLLi.iL("goog.exo.exoplayer");
}
public LIliIliLL(llLLiiL lllliil) {
boolean z;
Iiill.llLLiiL iL2;
try {
String hexString = Integer.toHexString(System.identityHashCode(this));
String str = LlIIlLiiIiilL.liLILIIiILI.lIlILilLLLlIi;
StringBuilder sb = new StringBuilder(String.valueOf(hexString).length() + 30 + String.valueOf(str).length());
sb.append("Init ");
sb.append(hexString);
sb.append(" [ExoPlayerLib/2.17.1] [");
sb.append(str);
sb.append("]");
Log.i("ExoPlayerImpl", sb.toString());
Context context = lllliil.f4052iL;
Looper looper = lllliil.iiilLllli;
this.lIlILilLLLlIi = context.getApplicationContext();
iIiilLLliIiIiL.lliIllIlLlL lliillillll = lllliil.LIiIl;
LlIIlLiiIiilL.LLllLLIiiIIlliI lLllLLIiiIIlliI = lllliil.IiiLIIlLiLLlLL;
this.lllLL = (LLIIliLLlIL) lliillillll.apply(lLllLLIiiIIlliI);
this.LlIIiIiIII = lllliil.IllLLLIil;
this.iiIiIiIILli = lllliil.IiILLLILLilLl;
this.LLlIiIILLiLli = false;
this.llii = lllliil.f4053iiL;
lLIlLl llilll = new lLIlLl(this);
this.IIll = llilll;
this.IILiliI = new L();
Handler handler = new Handler(looper);
llLiiILlllII[] iL3 = ((LIIiLiiLiLllli) lllliil.f4054lLi.get()).iL(handler, llilll, llilll, llilll, llilll);
this.iiiIil = iL3;
if (iL3.length > 0) {
z = true;
} else {
z = false;
}
Li.lliIllIlLlL.ILiIiliL(z);
this.LIiIl = (iiliiiLliIL.ILliiILllillL) lllliil.lIlILilLLLlIi.get();
iLLLLiiIi.llLLiiL lllliil2 = (iLLLLiiIi.llLLiiL) lllliil.IilIL.get();
this.Iili = (iLIlILIilLiii.i) lllliil.iiiIil.get();
this.f3975iiL = lllliil.iiLIIlIILiILilI;
this.LLIilI = lllliil.ILiIiliL;
this.illLlLIlllLILL = looper;
this.Liil = lLllLLIiiIIlliI;
this.IllLl = this;
this.iiLIIlIILiILilI = new LlIIlLiiIiilL.iiiLLlLl(looper, lLllLLIiiIIlliI, new ILIlIiLiilIlII(this));
this.ILiIiliL = new CopyOnWriteArraySet();
this.LlllL = new ArrayList();
this.iLLiLlllLLi = new iLLLLiiIi.LliIILliliil();
this.IiiLIIlLiLLlLL = new iiliiiLliIL.liLILIIiILI(new iiLilL[iL3.length], new iiliiiLliIL.iLIILLILliiII[iL3.length], IiLlIlllIIl.Liil, null);
this.IiliIiIil = new IiiilI();
iiIL.LiLIllLIiilL liLIllLIiilL = new iiIL.LiLIllLIiilL(3);
int[] iArr = {1, 2, 3, 13, 14, 15, 16, 17, 18, 19, 20, 30, 21, 22, 23, 24, 25, 26, 27, 28};
for (int i2 = 0; i2 < 20; i2++) {
liLIllLIiilL.IiiLIIlLiLLlLL(iArr[i2]);
}
this.LIiIl.getClass();
liLIllLIiilL.IiiLIIlLiLLlLL(29);
LlIIlLiiIiilL.lliIllIlLlL IilIL = liLIllLIiilL.IilIL();
this.f3978lLi = new liiIlIIiLll(IilIL);
iiIL.LiLIllLIiilL liLIllLIiilL2 = new iiIL.LiLIllLIiilL(3);
for (int i3 = 0; i3 < IilIL.IiiLIIlLiLLlLL(); i3++) {
liLIllLIiilL2.IiiLIIlLiLLlLL(IilIL.iL(i3));
}
liLIllLIiilL2.IiiLIIlLiLLlLL(4);
liLIllLIiilL2.IiiLIIlLiLLlLL(10);
this.LLlllILiLL = new liiIlIIiLll(liLIllLIiilL2.IilIL());
this.iiilLllli = this.Liil.iL(this.illLlLIlllLILL, null);
ILIlIiLiilIlII iLIlIiLiilIlII = new ILIlIiLiilIlII(this);
this.IllLLLIil = iLIlIiLiilIlII;
this.ILIIiiLIiiLiL = iiIilillliI.LIiIl(this.IiiLIIlLiLLlLL);
((Iiill.iIILlILIlil) this.lllLL).Liil(this.IllLl, this.illLlLIlllLILL);
int i4 = LlIIlLiiIiilL.liLILIIiILI.f1147iL;
if (i4 < 31) {
iL2 = new Iiill.llLLiiL();
} else {
iL2 = LLILllLiiILLLIi.iL();
}
this.IiILLLILLilLl = new IIlILIL(this.iiiIil, this.LIiIl, this.IiiLIIlLiLLlLL, (iIi) lllliil.IllLl.get(), this.Iili, 0, this.lllLL, this.LLIilI, lllliil.IiliIiIil, lllliil.LlllL, false, this.illLlLIlllLILL, this.Liil, iLIlIiLiilIlII, iL2);
this.f3977lI = 1.0f;
LIiiLi lIiiLi = LIiiLi.LlILiIlIILl;
this.lLlII = lIiiLi;
this.LlILiIlIILl = lIiiLi;
int i5 = -1;
this.IliILllLiiLiIi = -1;
if (i4 < 21) {
AudioTrack audioTrack = this.IIiLILiLLiIlIiI;
if (audioTrack != null && audioTrack.getAudioSessionId() != 0) {
this.IIiLILiLLiIlIiI.release();
this.IIiLILiLLiIlIiI = null;
}
if (this.IIiLILiLLiIlIiI == null) {
this.IIiLILiLLiIlIiI = new AudioTrack(3, 4000, 4, 2, 2, 0, 0);
}
this.llliIL = this.IIiLILiLLiIlIiI.getAudioSessionId();
} else {
AudioManager audioManager = (AudioManager) this.lIlILilLLLlIi.getSystemService("audio");
if (audioManager != null) {
i5 = audioManager.generateAudioSessionId();
}
this.llliIL = i5;
}
ilLLll.iilLLlLI iillllli = ilLLll.iilLLlLI.liliiiiLliIiLI;
this.iiiilIllLllLll = true;
LLIIliLLlIL lLIIliLLlIL = this.lllLL;
lLIIliLLlIL.getClass();
LlIIlLiiIiilL.iiiLLlLl iiilllll = this.iiLIIlIILiILilI;
if (!iiilllll.iiiIil) {
iiilllll.IilIL.add(new LlIIlLiiIiilL.llLiiILlllII(lLIIliLLlIL));
}
iLIlILIilLiii.i iVar = this.Iili;
Handler handler2 = new Handler(this.illLlLIlllLILL);
LLIIliLLlIL lLIIliLLlIL2 = this.lllLL;
iLIlILIilLiii.llLLiiL lllliil3 = (iLIlILIilLiii.llLLiiL) iVar;
lllliil3.getClass();
lLIIliLLlIL2.getClass();
iLLLLiiIi.iiIlllLIi iiillllii = lllliil3.IiiLIIlLiLLlLL;
iiillllii.getClass();
iiillllii.iIl(lLIIliLLlIL2);
((CopyOnWriteArrayList) iiillllii.f3853iL).add(new iLIlILIilLiii.Il(handler2, lLIIliLLlIL2));
this.ILiIiliL.add(this.IIll);
Il il = new Il(context, handler, this.IIll);
this.f3976l = il;
il.IiiLIIlLiLLlLL(false);
iiIlllLIi iiillllii2 = new iiIlllLIi(context, handler, this.IIll);
this.liliiiiLliIiLI = iiillllii2;
iiillllii2.lLi();
lLIIiiLiIiii lliiiiliiiii = new lLIIiiLiIiii(context, handler, this.IIll);
this.ii = lliiiiliiiii;
lliiiiliiiii.IiiLIIlLiLLlLL(LlIIlLiiIiilL.liLILIIiILI.IILiliI(this.LlIIiIiIII.IIll));
IililiIiIlliL iililiIiIlliL = new IililiIiIlliL(context, 2);
this.lILLilLiLLilL = iililiIiIlliL;
iililiIiIlliL.lIlILilLLLlIi(false);
IililiIiIlliL iililiIiIlliL2 = new IililiIiIlliL(context, 3);
this.lLLIIillILliIIL = iililiIiIlliL2;
iililiIiIlliL2.lIlILilLLLlIi(false);
this.lILl = IilIL(lliiiiliiiii);
lILLilLiLLilL(1, 10, Integer.valueOf(this.llliIL));
lILLilLiLLilL(2, 10, Integer.valueOf(this.llliIL));
lILLilLiLLilL(1, 3, this.LlIIiIiIII);
lILLilLiLLilL(2, 4, Integer.valueOf(this.iiIiIiIILli));
lILLilLiLLilL(2, 5, 0);
lILLilLiLLilL(1, 9, Boolean.valueOf(this.LLlIiIILLiLli));
lILLilLiLLilL(2, 7, this.IILiliI);
lILLilLiLLilL(6, 8, this.IILiliI);
} finally {
this.IilIL.IllLl();
}
}
public static iIILlILIlil IilIL(lLIIiiLiIiii lliiiiliiiii) {
int i2;
lliiiiliiiii.getClass();
if (LlIIlLiiIiilL.liLILIIiILI.f1147iL >= 28) {
i2 = lliiiiliiiii.IilIL.getStreamMinVolume(lliiiiliiiii.IllLl);
} else {
i2 = 0;
}
return new iIILlILIlil(0, i2, lliiiiliiiii.IilIL.getStreamMaxVolume(lliiiiliiiii.IllLl));
}
public static long LlllL(iiIilillliI iiiililllii) {
IiiI iiiI = new IiiI();
IiiilI iiiilI = new IiiilI();
iiiililllii.f4023iL.LIiIl(iiiililllii.IiiLIIlLiLLlLL.f3827iL, iiiilI);
long j = iiiililllii.f4025lLi;
if (j == -9223372036854775807L) {
return iiiililllii.f4023iL.IiliIiIil(iiiilI.IIll, iiiI).LLIilI;
}
return iiiilI.liliiiiLliIiLI + j;
}
public static boolean iiL(iiIilillliI iiiililllii) {
if (iiiililllii.lIlILilLLLlIi == 3 && iiiililllii.iiLIIlIILiILilI && iiiililllii.ILiIiliL == 0) {
return true;
}
return false;
}
public final void IILiliI() {
String str;
AudioTrack audioTrack;
String hexString = Integer.toHexString(System.identityHashCode(this));
String str2 = LlIIlLiiIiilL.liLILIIiILI.lIlILilLLLlIi;
HashSet hashSet = iillLLi.f4033iL;
synchronized (iillLLi.class) {
str = iillLLi.IiiLIIlLiLLlLL;
}
StringBuilder ILiIiliL = com.google.android.gms.internal.measurement.LLIIliLLlIL.ILiIiliL(IILiIILllIilI.lliIllIlLlL.IilIL(str, IILiIILllIilI.lliIllIlLlL.IilIL(str2, IILiIILllIilI.lliIllIlLlL.IilIL(hexString, 36))), "Release ", hexString, " [ExoPlayerLib/2.17.1] [", str2);
ILiIiliL.append("] [");
ILiIiliL.append(str);
ILiIiliL.append("]");
Log.i("ExoPlayerImpl", ILiIiliL.toString());
IIiLILiLLiIlIiI();
if (LlIIlLiiIiilL.liLILIIiILI.f1147iL < 21 && (audioTrack = this.IIiLILiLLiIlIiI) != null) {
audioTrack.release();
this.IIiLILiLLiIlIiI = null;
}
this.f3976l.IiiLIIlLiLLlLL(false);
lLIIiiLiIiii lliiiiliiiii = this.ii;
iiIL.L l2 = lliiiiliiiii.lIlILilLLLlIi;
if (l2 != null) {
try {
lliiiiliiiii.f4038iL.unregisterReceiver(l2);
} catch (RuntimeException e) {
iIliILliIILlii.iiIlllLIi.iIl("StreamVolumeManager", "Error unregistering stream volume receiver", e);
}
lliiiiliiiii.lIlILilLLLlIi = null;
}
this.lILLilLiLLilL.IllLl(false);
this.lLLIIillILliIIL.IllLl(false);
iiIlllLIi iiillllii = this.liliiiiLliIiLI;
iiillllii.f4027lLi = null;
iiillllii.iL();
if (!this.IiILLLILLilLl.ii()) {
this.iiLIIlIILiILilI.IilIL(10, new com.applovin.exoplayer2.m.LLIIliLLlIL(16));
}
this.iiLIIlIILiILilI.lLi();
this.iiilLllli.f1124iL.removeCallbacksAndMessages(null);
((iLIlILIilLiii.llLLiiL) this.Iili).IiiLIIlLiLLlLL.iIl(this.lllLL);
iiIilillliI IllLl = this.ILIIiiLIiiLiL.IllLl(1);
this.ILIIiiLIiiLiL = IllLl;
iiIilillliI iL2 = IllLl.iL(IllLl.IiiLIIlLiLLlLL);
this.ILIIiiLIiiLiL = iL2;
iL2.lllLL = iL2.Iili;
this.ILIIiiLIiiLiL.illLlLIlllLILL = 0L;
Iiill.iIILlILIlil iiillililil = (Iiill.iIILlILIlil) this.lllLL;
LlIIlLiiIiilL.ILIlIiLiilIlII iLIlIiLiilIlII = iiillililil.lLLIIillILliIIL;
Li.lliIllIlLlL.IiliIiIil(iLIlIiLiilIlII);
iLIlIiLiilIlII.f1124iL.post(new androidx.activity.IililiIiIlliL(iiillililil, 23));
ii();
Surface surface = this.lLliLll;
if (surface != null) {
surface.release();
this.lLliLll = null;
}
ilLLll.iilLLlLI iillllli = ilLLll.iilLLlLI.liliiiiLliIiLI;
}
public final void IIiLILiLLiIlIiI() {
IllegalStateException illegalStateException;
iiIL.LiLIllLIiilL liLIllLIiilL = this.IilIL;
synchronized (liLIllLIiilL) {
boolean z = false;
while (!liLIllLIiilL.f4297iL) {
try {
liLIllLIiilL.wait();
} catch (InterruptedException unused) {
z = true;
}
}
if (z) {
Thread.currentThread().interrupt();
}
}
if (Thread.currentThread() != this.illLlLIlllLILL.getThread()) {
String iiLIIlIILiILilI = LlIIlLiiIiilL.liLILIIiILI.iiLIIlIILiILilI("Player is accessed on the wrong thread.\nCurrent thread: '%s'\nExpected thread: '%s'\nSee https://exoplayer.dev/issues/player-accessed-on-wrong-thread", Thread.currentThread().getName(), this.illLlLIlllLILL.getThread().getName());
if (!this.iiiilIllLllLll) {
if (this.iIliLiilIIlilil) {
illegalStateException = null;
} else {
illegalStateException = new IllegalStateException();
}
iIliILliIILlii.iiIlllLIi.iIl("ExoPlayerImpl", iiLIIlIILiILilI, illegalStateException);
this.iIliLiilIIlilil = true;
return;
}
throw new IllegalStateException(iiLIIlIILiILilI);
}
}
public final void IIll() {
int i2;
IIiLILiLLiIlIiI();
IIiLILiLLiIlIiI();
boolean z = this.ILIIiiLIiiLiL.iiLIIlIILiILilI;
int i3 = 2;
int lIlILilLLLlIi = this.liliiiiLliIiLI.lIlILilLLLlIi(2, z);
if (z && lIlILilLLLlIi != 1) {
i2 = 2;
} else {
i2 = 1;
}
iLLiLlllLLi(lIlILilLLLlIi, i2, z);
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
if (iiiililllii.lIlILilLLLlIi != 1) {
return;
}
iiIilillliI lIlILilLLLlIi2 = iiiililllii.lIlILilLLLlIi(null);
if (lIlILilLLLlIi2.f4023iL.lllLL()) {
i3 = 4;
}
iiIilillliI IllLl = lIlILilLLLlIi2.IllLl(i3);
this.f3974i++;
LlIIlLiiIiilL.ILIlIiLiilIlII iLIlIiLiilIlII = this.IiILLLILLilLl.lLLIIillILliIIL;
iLIlIiLiilIlII.getClass();
LlIIlLiiIiilL.liLLIllI IiiLIIlLiLLlLL = LlIIlLiiIiilL.ILIlIiLiilIlII.IiiLIIlLiLLlLL();
IiiLIIlLiLLlLL.f1149iL = iLIlIiLiilIlII.f1124iL.obtainMessage(0);
IiiLIIlLiLLlLL.iL();
LLlllILiLL(IllLl, 1, 1, false, false, 5, -9223372036854775807L, -1);
}
public final int ILiIiliL() {
if (this.ILIIiiLIiiLiL.f4023iL.lllLL()) {
return this.IliILllLiiLiIi;
}
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
return iiiililllii.f4023iL.LIiIl(iiiililllii.IiiLIIlLiLLlLL.f3827iL, this.IiliIiIil).IIll;
}
public final long IiILLLILLilLl(iiIilillliI iiiililllii) {
if (iiiililllii.f4023iL.lllLL()) {
return LlIIlLiiIiilL.liLILIIiILI.llii(this.LlIlIiliLIIIili);
}
if (iiiililllii.IiiLIIlLiLLlLL.iL()) {
return iiiililllii.Iili;
}
liIIIiiLiilL liiiiiiliill = iiiililllii.f4023iL;
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI = iiiililllii.IiiLIIlLiLLlLL;
long j = iiiililllii.Iili;
Object obj = lLllLLIiiIIlliI.f3827iL;
IiiilI iiiilI = this.IiliIiIil;
liiiiiiliill.LIiIl(obj, iiiilI);
return j + iiiilI.liliiiiLliIiLI;
}
public final Pair Iili(liIIIiiLiilL liiiiiiliill, int i2, long j) {
if (liiiiiiliill.lllLL()) {
this.IliILllLiiLiIi = i2;
if (j == -9223372036854775807L) {
j = 0;
}
this.LlIlIiliLIIIili = j;
return null;
}
if (i2 == -1 || i2 >= liiiiiiliill.iiL()) {
i2 = liiiiiiliill.iL(false);
j = LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(liiiiiiliill.IiliIiIil(i2, this.f4015iL).LLIilI);
}
return liiiiiiliill.IllLLLIil(this.f4015iL, this.IiliIiIil, i2, LlIIlLiiIiilL.liLILIIiILI.llii(j));
}
public final long IiliIiIil() {
IIiLILiLLiIlIiI();
if (lllLL()) {
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI = iiiililllii.IiiLIIlLiLLlLL;
Object obj = lLllLLIiiIIlliI.f3827iL;
liIIIiiLiilL liiiiiiliill = iiiililllii.f4023iL;
IiiilI iiiilI = this.IiliIiIil;
liiiiiiliill.LIiIl(obj, iiiilI);
return LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(iiiilI.iL(lLllLLIiiIIlliI.IiiLIIlLiLLlLL, lLllLLIiiIIlliI.f3828lLi));
}
liIIIiiLiilL iiLIIlIILiILilI = iiLIIlIILiILilI();
if (iiLIIlIILiILilI.lllLL()) {
return -9223372036854775807L;
}
return LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(iiLIIlIILiILilI.IiliIiIil(LIiIl(), this.f4015iL).iLLiLlllLLi);
}
public final long IllLLLIil() {
IIiLILiLLiIlIiI();
return LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(IiILLLILLilLl(this.ILIIiiLIiiLiL));
}
public final int IllLl() {
IIiLILiLLiIlIiI();
if (lllLL()) {
return this.ILIIiiLIiiLiL.IiiLIIlLiLLlLL.IiiLIIlLiLLlLL;
}
return -1;
}
public final int LIiIl() {
IIiLILiLLiIlIiI();
int ILiIiliL = ILiIiliL();
if (ILiIiliL == -1) {
return 0;
}
return ILiIiliL;
}
public final void LLIilI(ILliiILllillL iLliiILllillL) {
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
iiIilillliI iL2 = iiiililllii.iL(iiiililllii.IiiLIIlLiLLlLL);
iL2.lllLL = iL2.Iili;
iL2.illLlLIlllLILL = 0L;
boolean z = true;
iiIilillliI IllLl = iL2.IllLl(1);
if (iLliiILllillL != null) {
IllLl = IllLl.lIlILilLLLlIi(iLliiILllillL);
}
iiIilillliI iiiililllii2 = IllLl;
this.f3974i++;
LlIIlLiiIiilL.ILIlIiLiilIlII iLIlIiLiilIlII = this.IiILLLILLilLl.lLLIIillILliIIL;
iLIlIiLiilIlII.getClass();
LlIIlLiiIiilL.liLLIllI IiiLIIlLiLLlLL = LlIIlLiiIiilL.ILIlIiLiilIlII.IiiLIIlLiLLlLL();
IiiLIIlLiLLlLL.f1149iL = iLIlIiLiilIlII.f1124iL.obtainMessage(6);
IiiLIIlLiLLlLL.iL();
LLlllILiLL(iiiililllii2, 0, 1, false, (!iiiililllii2.f4023iL.lllLL() || this.ILIIiiLIiiLiL.f4023iL.lllLL()) ? false : false, 4, IiILLLILLilLl(iiiililllii2), -1);
}
public final void LLlllILiLL(final iiIilillliI iiiililllii, final int i2, final int i3, boolean z, boolean z2, int i4, long j, int i5) {
Pair pair;
int i6;
iLiILllil iliilllil;
boolean z3;
boolean z4;
boolean z5;
final int i7;
boolean z6;
int iiLIIlIILiILilI;
int i8;
boolean z7;
boolean z8;
int lIlILilLLLlIi;
boolean z9;
boolean z10;
boolean z11;
boolean z12;
boolean z13;
boolean z14;
boolean z15;
boolean z16;
boolean z17;
int i9;
boolean z18;
int i10;
Object obj;
iLiILllil iliilllil2;
Object obj2;
int i11;
long j2;
long j3;
long j4;
long LlllL;
Object obj3;
iLiILllil iliilllil3;
Object obj4;
int i12;
long j5;
iiIilillliI iiiililllii2 = this.ILIIiiLIiiLiL;
this.ILIIiiLIiiLiL = iiiililllii;
boolean z19 = !iiiililllii2.f4023iL.equals(iiiililllii.f4023iL);
liIIIiiLiilL liiiiiiliill = iiiililllii2.f4023iL;
liIIIiiLiilL liiiiiiliill2 = iiiililllii.f4023iL;
if (liiiiiiliill2.lllLL() && liiiiiiliill.lllLL()) {
pair = new Pair(Boolean.FALSE, -1);
} else if (liiiiiiliill2.lllLL() != liiiiiiliill.lllLL()) {
pair = new Pair(Boolean.TRUE, 3);
} else {
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI = iiiililllii2.IiiLIIlLiLLlLL;
Object obj5 = lLllLLIiiIIlliI.f3827iL;
IiiilI iiiilI = this.IiliIiIil;
int i13 = liiiiiiliill.LIiIl(obj5, iiiilI).IIll;
IiiI iiiI = this.f4015iL;
Object obj6 = liiiiiiliill.IiliIiIil(i13, iiiI).f3957iL;
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI2 = iiiililllii.IiiLIIlLiLLlLL;
if (!obj6.equals(liiiiiiliill2.IiliIiIil(liiiiiiliill2.LIiIl(lLllLLIiiIIlliI2.f3827iL, iiiilI).IIll, iiiI).f3957iL)) {
if (z2 && i4 == 0) {
i6 = 1;
} else if (z2 && i4 == 1) {
i6 = 2;
} else if (z19) {
i6 = 3;
} else {
throw new IllegalStateException();
}
pair = new Pair(Boolean.TRUE, Integer.valueOf(i6));
} else if (z2 && i4 == 0 && lLllLLIiiIIlliI.IilIL < lLllLLIiiIIlliI2.IilIL) {
pair = new Pair(Boolean.TRUE, 0);
} else {
pair = new Pair(Boolean.FALSE, -1);
}
}
boolean booleanValue = ((Boolean) pair.first).booleanValue();
int intValue = ((Integer) pair.second).intValue();
LIiiLi lIiiLi = this.lLlII;
if (booleanValue) {
if (!iiiililllii.f4023iL.lllLL()) {
iliilllil = iiiililllii.f4023iL.IiliIiIil(iiiililllii.f4023iL.LIiIl(iiiililllii.IiiLIIlLiLLlLL.f3827iL, this.IiliIiIil).IIll, this.f4015iL).IIll;
} else {
iliilllil = null;
}
this.LlILiIlIILl = LIiiLi.LlILiIlIILl;
} else {
iliilllil = null;
}
if (booleanValue || !iiiililllii2.IllLLLIil.equals(iiiililllii.IllLLLIil)) {
LIiiLi lIiiLi2 = this.LlILiIlIILl;
lIiiLi2.getClass();
LILLlLILIiilLLI lILLlLILIiilLLI = new LILLlLILIiilLLI(lIiiLi2);
List list = iiiililllii.IllLLLIil;
for (int i14 = 0; i14 < list.size(); i14++) {
iIL.iiLli iilli = (iIL.iiLli) list.get(i14);
int i15 = 0;
while (true) {
iIL.IililiIiIlliL[] iililiIiIlliLArr = iilli.f3439iL;
if (i15 < iililiIiIlliLArr.length) {
iililiIiIlliLArr[i15].IllLl(lILLlLILIiilLLI);
i15++;
}
}
}
this.LlILiIlIILl = new LIiiLi(lILLlLILIiilLLI);
lIiiLi = lLi();
}
boolean z20 = !lIiiLi.equals(this.lLlII);
this.lLlII = lIiiLi;
if (iiiililllii2.iiLIIlIILiILilI != iiiililllii.iiLIIlIILiILilI) {
z3 = true;
} else {
z3 = false;
}
if (iiiililllii2.lIlILilLLLlIi != iiiililllii.lIlILilLLLlIi) {
z4 = true;
} else {
z4 = false;
}
if (z4 || z3) {
lLlII();
}
if (iiiililllii2.iiiIil != iiiililllii.iiiIil) {
z5 = true;
} else {
z5 = false;
}
if (!iiiililllii2.f4023iL.equals(iiiililllii.f4023iL)) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(0, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj7) {
int i16 = r2;
int i17 = i2;
iiIilillliI iiiililllii3 = iiiililllii;
switch (i16) {
case 0:
((IliIIiL) obj7).onTimelineChanged(iiiililllii3.f4023iL, i17);
return;
default:
((IliIIiL) obj7).onPlayWhenReadyChanged(iiiililllii3.iiLIIlIILiILilI, i17);
return;
}
}
});
}
if (z2) {
IiiilI iiiilI2 = new IiiilI();
if (!iiiililllii2.f4023iL.lllLL()) {
Object obj7 = iiiililllii2.IiiLIIlLiLLlLL.f3827iL;
iiiililllii2.f4023iL.LIiIl(obj7, iiiilI2);
int i16 = iiiilI2.IIll;
i11 = iiiililllii2.f4023iL.IiiLIIlLiLLlLL(obj7);
obj = iiiililllii2.f4023iL.IiliIiIil(i16, this.f4015iL).f3957iL;
iliilllil2 = this.f4015iL.IIll;
i10 = i16;
obj2 = obj7;
} else {
i10 = i5;
obj = null;
iliilllil2 = null;
obj2 = null;
i11 = -1;
}
if (i4 == 0) {
if (iiiililllii2.IiiLIIlLiLLlLL.iL()) {
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI3 = iiiililllii2.IiiLIIlLiLLlLL;
j4 = iiiilI2.iL(lLllLLIiiIIlliI3.IiiLIIlLiLLlLL, lLllLLIiiIIlliI3.f3828lLi);
LlllL = LlllL(iiiililllii2);
} else if (iiiililllii2.IiiLIIlLiLLlLL.lIlILilLLLlIi != -1) {
j4 = LlllL(this.ILIIiiLIiiLiL);
LlllL = j4;
} else {
j2 = iiiilI2.liliiiiLliIiLI;
j3 = iiiilI2.IILiliI;
j4 = j2 + j3;
LlllL = j4;
}
} else if (iiiililllii2.IiiLIIlLiLLlLL.iL()) {
j4 = iiiililllii2.Iili;
LlllL = LlllL(iiiililllii2);
} else {
j2 = iiiilI2.liliiiiLliIiLI;
j3 = iiiililllii2.Iili;
j4 = j2 + j3;
LlllL = j4;
}
long LLlllILiLL = LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(j4);
long LLlllILiLL2 = LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(LlllL);
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI4 = iiiililllii2.IiiLIIlLiLLlLL;
iIILiillLlLILi iiiliilllllili = new iIILiillLlLILi(obj, i10, iliilllil2, obj2, i11, LLlllILiLL, LLlllILiLL2, lLllLLIiiIIlliI4.IiiLIIlLiLLlLL, lLllLLIiiIIlliI4.f3828lLi);
int LIiIl = LIiIl();
if (!this.ILIIiiLIiiLiL.f4023iL.lllLL()) {
iiIilillliI iiiililllii3 = this.ILIIiiLIiiLiL;
Object obj8 = iiiililllii3.IiiLIIlLiLLlLL.f3827iL;
iiiililllii3.f4023iL.LIiIl(obj8, this.IiliIiIil);
int IiiLIIlLiLLlLL = this.ILIIiiLIiiLiL.f4023iL.IiiLIIlLiLLlLL(obj8);
liIIIiiLiilL liiiiiiliill3 = this.ILIIiiLIiiLiL.f4023iL;
IiiI iiiI2 = this.f4015iL;
Object obj9 = liiiiiiliill3.IiliIiIil(LIiIl, iiiI2).f3957iL;
i12 = IiiLIIlLiLLlLL;
iliilllil3 = iiiI2.IIll;
obj4 = obj8;
obj3 = obj9;
} else {
obj3 = null;
iliilllil3 = null;
obj4 = null;
i12 = -1;
}
long LLlllILiLL3 = LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(j);
if (this.ILIIiiLIiiLiL.IiiLIIlLiLLlLL.iL()) {
j5 = LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(LlllL(this.ILIIiiLIiiLiL));
} else {
j5 = LLlllILiLL3;
}
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI5 = this.ILIIiiLIiiLiL.IiiLIIlLiLLlLL;
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(11, new com.applovin.exoplayer2.a.iiiLLlLl(iiiliilllllili, new iIILiillLlLILi(obj3, LIiIl, iliilllil3, obj4, i12, LLlllILiLL3, j5, lLllLLIiiIIlliI5.IiiLIIlLiLLlLL, lLllLLIiiIIlliI5.f3828lLi), i4));
}
if (booleanValue) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(1, new iIliILliIILlii.llIlliLLliII(iliilllil, intValue));
}
if (iiiililllii2.IllLl != iiiililllii.IllLl) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(10, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj10) {
int i17 = r2;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj10).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj10).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj10).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj10).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj10).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj10).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj10).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj10;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj10).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
if (iiiililllii.IllLl != null) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(10, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj10) {
int i17 = r2;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj10).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj10).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj10).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj10).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj10).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj10).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj10).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj10;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj10).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
}
iiliiiLliIL.liLILIIiILI lililiiiili = iiiililllii2.iiilLllli;
iiliiiLliIL.liLILIIiILI lililiiiili2 = iiiililllii.iiilLllli;
if (lililiiiili != lililiiiili2) {
iiliiiLliIL.ILliiILllillL iLliiILllillL = this.LIiIl;
Object obj10 = lililiiiili2.lIlILilLLLlIi;
iLliiILllillL.getClass();
iiliiiLliIL.iIILlILIlil iiillililil = (iiliiiLliIL.iIILlILIlil) obj10;
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(2, new com.applovin.exoplayer2.a.IliiilIiiLIIlLl(12, iiiililllii, new iiliiiLliIL.llLLiiL(iiiililllii.iiilLllli.f4504lLi)));
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(2, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = r2;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (z20) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(14, new androidx.core.app.llLiiILlllII(this.lLlII, 15));
}
if (z5) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(3, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = r2;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (z4 || z3) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(-1, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = r2;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (z4) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(4, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = r2;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (z3) {
i7 = 1;
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(5, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj72) {
int i162 = r2;
int i17 = i3;
iiIilillliI iiiililllii32 = iiiililllii;
switch (i162) {
case 0:
((IliIIiL) obj72).onTimelineChanged(iiiililllii32.f4023iL, i17);
return;
default:
((IliIIiL) obj72).onPlayWhenReadyChanged(iiiililllii32.iiLIIlIILiILilI, i17);
return;
}
}
});
} else {
i7 = 1;
}
if (iiiililllii2.ILiIiliL != iiiililllii.ILiIiliL) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(6, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = i7;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (iiL(iiiililllii2) != iiL(iiiililllii)) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(7, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = i7;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (!iiiililllii2.IiliIiIil.equals(iiiililllii.IiliIiIil)) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(12, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj102) {
int i17 = i7;
iiIilillliI iiiililllii4 = iiiililllii;
switch (i17) {
case 0:
((IliIIiL) obj102).onPlaybackStateChanged(iiiililllii4.lIlILilLLLlIi);
return;
case 1:
((IliIIiL) obj102).onPlaybackSuppressionReasonChanged(iiiililllii4.ILiIiliL);
return;
case 2:
((IliIIiL) obj102).onIsPlayingChanged(LIliIliLL.iiL(iiiililllii4));
return;
case 3:
((IliIIiL) obj102).onPlaybackParametersChanged(iiiililllii4.IiliIiIil);
return;
case 4:
((IliIIiL) obj102).onPlayerErrorChanged(iiiililllii4.IllLl);
return;
case 5:
((IliIIiL) obj102).onPlayerError(iiiililllii4.IllLl);
return;
case 6:
((IliIIiL) obj102).onTracksInfoChanged(iiiililllii4.iiilLllli.IilIL);
return;
case 7:
IliIIiL iliIIiL = (IliIIiL) obj102;
iliIIiL.onLoadingChanged(iiiililllii4.iiiIil);
iliIIiL.onIsLoadingChanged(iiiililllii4.iiiIil);
return;
default:
((IliIIiL) obj102).onPlayerStateChanged(iiiililllii4.iiLIIlIILiILilI, iiiililllii4.lIlILilLLLlIi);
return;
}
}
});
}
if (z) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(-1, new com.applovin.exoplayer2.m.LLIIliLLlIL(15));
}
liiIlIIiLll liiiliiilll = this.LLlllILiLL;
int i17 = LlIIlLiiIiilL.liLILIIiILI.f1147iL;
LIliIliLL lIliIliLL = (LIliIliLL) this.IllLl;
boolean lllLL = lIliIliLL.lllLL();
liIIIiiLiilL iiLIIlIILiILilI2 = lIliIliLL.iiLIIlIILiILilI();
boolean lllLL2 = iiLIIlIILiILilI2.lllLL();
IiiI iiiI3 = lIliIliLL.f4015iL;
if (!lllLL2 && iiLIIlIILiILilI2.IiliIiIil(lIliIliLL.LIiIl(), iiiI3).lLLIIillILliIIL) {
z6 = true;
} else {
z6 = false;
}
liIIIiiLiilL iiLIIlIILiILilI3 = lIliIliLL.iiLIIlIILiILilI();
if (iiLIIlIILiILilI3.lllLL()) {
i8 = -1;
iiLIIlIILiILilI = -1;
} else {
int LIiIl2 = lIliIliLL.LIiIl();
lIliIliLL.IIiLILiLLiIlIiI();
lIliIliLL.IIiLILiLLiIlIiI();
iiLIIlIILiILilI = iiLIIlIILiILilI3.iiLIIlIILiILilI(LIiIl2, 0, false);
i8 = -1;
}
if (iiLIIlIILiILilI != i8) {
z7 = true;
} else {
z7 = false;
}
liIIIiiLiilL iiLIIlIILiILilI4 = lIliIliLL.iiLIIlIILiILilI();
if (iiLIIlIILiILilI4.lllLL()) {
z8 = false;
lIlILilLLLlIi = -1;
} else {
int LIiIl3 = lIliIliLL.LIiIl();
lIliIliLL.IIiLILiLLiIlIiI();
lIliIliLL.IIiLILiLLiIlIiI();
z8 = false;
lIlILilLLLlIi = iiLIIlIILiILilI4.lIlILilLLLlIi(LIiIl3, 0, false);
}
if (lIlILilLLLlIi != -1) {
z9 = true;
} else {
z9 = z8;
}
liIIIiiLiilL iiLIIlIILiILilI5 = lIliIliLL.iiLIIlIILiILilI();
if (!iiLIIlIILiILilI5.lllLL() && iiLIIlIILiILilI5.IiliIiIil(lIliIliLL.LIiIl(), iiiI3).iL()) {
z10 = true;
} else {
z10 = false;
}
liIIIiiLiilL iiLIIlIILiILilI6 = lIliIliLL.iiLIIlIILiILilI();
if (!iiLIIlIILiILilI6.lllLL() && iiLIIlIILiILilI6.IiliIiIil(lIliIliLL.LIiIl(), iiiI3).llii) {
z11 = true;
} else {
z11 = false;
}
boolean lllLL3 = lIliIliLL.iiLIIlIILiILilI().lllLL();
lIiLiLLll liilillll = new lIiLiLLll();
LlIIlLiiIiilL.lliIllIlLlL lliillillll = this.f3978lLi.f4048iL;
iiIL.LiLIllLIiilL liLIllLIiilL = liilillll.f4037iL;
liLIllLIiilL.getClass();
for (int i18 = 0; i18 < lliillillll.IiiLIIlLiLLlLL(); i18++) {
liLIllLIiilL.IiiLIIlLiLLlLL(lliillillll.iL(i18));
}
boolean z21 = !lllLL;
liilillll.iL(4, z21);
if (z6 && !lllLL) {
z12 = true;
} else {
z12 = false;
}
liilillll.iL(5, z12);
if (z7 && !lllLL) {
z13 = true;
} else {
z13 = false;
}
liilillll.iL(6, z13);
if (!lllLL3 && ((z7 || !z10 || z6) && !lllLL)) {
z14 = true;
} else {
z14 = false;
}
liilillll.iL(7, z14);
if (z9 && !lllLL) {
z15 = true;
} else {
z15 = false;
}
liilillll.iL(8, z15);
if (!lllLL3 && ((z9 || (z10 && z11)) && !lllLL)) {
z16 = true;
} else {
z16 = false;
}
liilillll.iL(9, z16);
liilillll.iL(10, z21);
if (z6 && !lllLL) {
z17 = true;
} else {
z17 = false;
}
liilillll.iL(11, z17);
if (z6 && !lllLL) {
i9 = 12;
z18 = true;
} else {
i9 = 12;
z18 = false;
}
liilillll.iL(i9, z18);
liiIlIIiLll liiiliiilll2 = new liiIlIIiLll(liilillll.f4037iL.IilIL());
this.LLlllILiLL = liiiliiilll2;
if (!liiiliiilll2.equals(liiiliiilll)) {
this.iiLIIlIILiILilI.IiiLIIlLiLLlLL(13, new ILIlIiLiilIlII(this));
}
this.iiLIIlIILiILilI.iL();
if (iiiililllii2.LlllL != iiiililllii.LlllL) {
Iterator it = this.ILiIiliL.iterator();
while (it.hasNext()) {
((lLIlLl) it.next()).getClass();
}
}
if (iiiililllii2.f4024iiL != iiiililllii.f4024iiL) {
Iterator it2 = this.ILiIiliL.iterator();
while (it2.hasNext()) {
((lLIlLl) it2.next()).f4040iL.lLlII();
}
}
}
public final void Liil(final int i2, final int i3) {
if (i2 != this.iLLILLiIIl || i3 != this.lliIii) {
this.iLLILLiIIl = i2;
this.lliIii = i3;
this.iiLIIlIILiILilI.IilIL(24, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj) {
((IliIIiL) obj).onSurfaceSizeChanged(i2, i3);
}
});
}
}
public final void i(Surface surface) {
llLiiILlllII[] llliiilllliiArr;
boolean z;
int i2;
ArrayList arrayList = new ArrayList();
for (llLiiILlllII llliiillllii : this.iiiIil) {
if (llliiillllii.f4055iL == 2) {
int ILiIiliL = ILiIiliL();
liIIIiiLiilL liiiiiiliill = this.ILIIiiLIiiLiL.f4023iL;
if (ILiIiliL == -1) {
i2 = 0;
} else {
i2 = ILiIiliL;
}
LlIIlLiiIiilL.LLllLLIiiIIlliI lLllLLIiiIIlliI = this.Liil;
IIlILIL iIlILIL = this.IiILLLILLilLl;
iIiillIIIlllil iiiilliiilllil = new iIiillIIIlllil(iIlILIL, llliiillllii, liiiiiiliill, i2, lLllLLIiiIIlliI, iIlILIL.il);
Li.lliIllIlLlL.ILiIiliL(!iiiilliiilllil.iiiIil);
iiiilliiilllil.IilIL = 1;
Li.lliIllIlLlL.ILiIiliL(!iiiilliiilllil.iiiIil);
iiiilliiilllil.lIlILilLLLlIi = surface;
iiiilliiilllil.lLi();
arrayList.add(iiiilliiilllil);
}
}
Object obj = this.IIlLiL;
if (obj != null && obj != surface) {
try {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
((iIiillIIIlllil) it.next()).iL(this.llii);
}
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
} catch (TimeoutException unused2) {
z = true;
}
z = false;
Object obj2 = this.IIlLiL;
Surface surface2 = this.lLliLll;
if (obj2 == surface2) {
surface2.release();
this.lLliLll = null;
}
} else {
z = false;
}
this.IIlLiL = surface;
if (z) {
LLIilI(new ILliiILllillL(2, new LL.IliiilIiiLIIlLl(3), 1003));
}
}
public final void iIl(float f) {
IIiLILiLLiIlIiI();
final float iiiIil = LlIIlLiiIiilL.liLILIIiILI.iiiIil(f, 0.0f, 1.0f);
if (this.f3977lI == iiiIil) {
return;
}
this.f3977lI = iiiIil;
lILLilLiLLilL(1, 2, Float.valueOf(this.liliiiiLliIiLI.iiiIil * iiiIil));
this.iiLIIlIILiILilI.IilIL(22, new LlIIlLiiIiilL.iiIlllLIi() {
@Override
public final void invoke(Object obj) {
((IliIIiL) obj).onVolumeChanged(iiiIil);
}
});
}
public final void iLLiLlllLLi(int i2, int i3, boolean z) {
?? r3;
int i4 = 0;
if (z && i2 != -1) {
r3 = 1;
} else {
r3 = 0;
}
if (r3 != 0 && i2 != 1) {
i4 = 1;
}
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
if (iiiililllii.iiLIIlIILiILilI == r3 && iiiililllii.ILiIiliL == i4) {
return;
}
this.f3974i++;
iiIilillliI IilIL = iiiililllii.IilIL(i4, r3);
LlIIlLiiIiilL.ILIlIiLiilIlII iLIlIiLiilIlII = this.IiILLLILLilLl.lLLIIillILliIIL;
iLIlIiLiilIlII.getClass();
LlIIlLiiIiilL.liLLIllI IiiLIIlLiLLlLL = LlIIlLiiIiilL.ILIlIiLiilIlII.IiiLIIlLiLLlLL();
IiiLIIlLiLLlLL.f1149iL = iLIlIiLiilIlII.f1124iL.obtainMessage(1, r3, i4);
IiiLIIlLiLLlLL.iL();
LLlllILiLL(IilIL, 0, i3, false, false, 5, -9223372036854775807L, -1);
}
public final void ii() {
TextureView textureView = this.iLiliilI;
lLIlLl llilll = this.IIll;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != llilll) {
Log.w("ExoPlayerImpl", "SurfaceTextureListener already unset or replaced.");
} else {
this.iLiliilI.setSurfaceTextureListener(null);
}
this.iLiliilI = null;
}
SurfaceHolder surfaceHolder = this.ilLLLiILLl;
if (surfaceHolder != null) {
surfaceHolder.removeCallback(llilll);
this.ilLLLiILLl = null;
}
}
public final liIIIiiLiilL iiLIIlIILiILilI() {
IIiLILiLLiIlIiI();
return this.ILIIiiLIiiLiL.f4023iL;
}
public final int iiiIil() {
IIiLILiLLiIlIiI();
if (lllLL()) {
return this.ILIIiiLIiiLiL.IiiLIIlLiLLlLL.f3828lLi;
}
return -1;
}
public final int iiilLllli() {
IIiLILiLLiIlIiI();
if (this.ILIIiiLIiiLiL.f4023iL.lllLL()) {
return 0;
}
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
return iiiililllii.f4023iL.IiiLIIlLiLLlLL(iiiililllii.IiiLIIlLiLLlLL.f3827iL);
}
public final void il(SurfaceView surfaceView) {
SurfaceHolder holder;
IIiLILiLLiIlIiI();
if (surfaceView == null) {
holder = null;
} else {
holder = surfaceView.getHolder();
}
IIiLILiLLiIlIiI();
if (holder == null) {
IIiLILiLLiIlIiI();
ii();
i(null);
Liil(0, 0);
return;
}
ii();
this.ILIlilILIliLiLl = true;
this.ilLLLiILLl = holder;
holder.addCallback(this.IIll);
Surface surface = holder.getSurface();
if (surface != null && surface.isValid()) {
i(surface);
Rect surfaceFrame = holder.getSurfaceFrame();
Liil(surfaceFrame.width(), surfaceFrame.height());
return;
}
i(null);
Liil(0, 0);
}
public final iiIilillliI illLlLIlllLILL(iiIilillliI iiiililllii, liIIIiiLiilL liiiiiiliill, Pair pair) {
boolean z;
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI;
iLLLLiiIi.LiLIllLIiilL liLIllLIiilL;
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI2;
iiliiiLliIL.liLILIIiILI lililiiiili;
List list;
int i2;
long j;
if (!liiiiiiliill.lllLL() && pair == null) {
z = false;
} else {
z = true;
}
Li.lliIllIlLlL.IllLLLIil(z);
liIIIiiLiilL liiiiiiliill2 = iiiililllii.f4023iL;
iiIilillliI iiiIil = iiiililllii.iiiIil(liiiiiiliill);
if (liiiiiiliill.lllLL()) {
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI3 = iiIilillliI.Liil;
long llii = LlIIlLiiIiilL.liLILIIiILI.llii(this.LlIlIiliLIIIili);
iiIilillliI iL2 = iiiIil.IiiLIIlLiLLlLL(lLllLLIiiIIlliI3, llii, llii, llii, 0L, iLLLLiiIi.LiLIllLIiilL.IILiliI, this.IiiLIIlLiLLlLL, ilLLll.iilLLlLI.liliiiiLliIiLI).iL(lLllLLIiiIIlliI3);
iL2.lllLL = iL2.Iili;
return iL2;
}
Object obj = iiiIil.IiiLIIlLiLLlLL.f3827iL;
int i3 = LlIIlLiiIiilL.liLILIIiILI.f1147iL;
boolean z2 = !obj.equals(pair.first);
if (z2) {
lLllLLIiiIIlliI = new iLLLLiiIi.LLllLLIiiIIlliI(pair.first);
} else {
lLllLLIiiIIlliI = iiiIil.IiiLIIlLiLLlLL;
}
iLLLLiiIi.LLllLLIiiIIlliI lLllLLIiiIIlliI4 = lLllLLIiiIIlliI;
long longValue = ((Long) pair.second).longValue();
long llii2 = LlIIlLiiIiilL.liLILIIiILI.llii(lIlILilLLLlIi());
if (!liiiiiiliill2.lllLL()) {
llii2 -= liiiiiiliill2.LIiIl(obj, this.IiliIiIil).liliiiiLliIiLI;
}
if (!z2 && longValue >= llii2) {
if (i2 == 0) {
int IiiLIIlLiLLlLL = liiiiiiliill.IiiLIIlLiLLlLL(iiiIil.IiILLLILLilLl.f3827iL);
if (IiiLIIlLiLLlLL == -1 || liiiiiiliill.iiiIil(IiiLIIlLiLLlLL, this.IiliIiIil, false).IIll != liiiiiiliill.LIiIl(lLllLLIiiIIlliI4.f3827iL, this.IiliIiIil).IIll) {
liiiiiiliill.LIiIl(lLllLLIiiIIlliI4.f3827iL, this.IiliIiIil);
if (lLllLLIiiIIlliI4.iL()) {
j = this.IiliIiIil.iL(lLllLLIiiIIlliI4.IiiLIIlLiLLlLL, lLllLLIiiIIlliI4.f3828lLi);
} else {
j = this.IiliIiIil.IILiliI;
}
iiiIil = iiiIil.IiiLIIlLiLLlLL(lLllLLIiiIIlliI4, iiiIil.Iili, iiiIil.Iili, iiiIil.IilIL, j - iiiIil.Iili, iiiIil.LIiIl, iiiIil.iiilLllli, iiiIil.IllLLLIil).iL(lLllLLIiiIIlliI4);
iiiIil.lllLL = j;
}
} else {
Li.lliIllIlLlL.ILiIiliL(!lLllLLIiiIIlliI4.iL());
long max = Math.max(0L, iiiIil.illLlLIlllLILL - (longValue - llii2));
long j2 = iiiIil.lllLL;
if (iiiIil.IiILLLILLilLl.equals(iiiIil.IiiLIIlLiLLlLL)) {
j2 = longValue + max;
}
iiiIil = iiiIil.IiiLIIlLiLLlLL(lLllLLIiiIIlliI4, longValue, longValue, longValue, max, iiiIil.LIiIl, iiiIil.iiilLllli, iiiIil.IllLLLIil);
iiiIil.lllLL = j2;
}
return iiiIil;
}
Li.lliIllIlLlL.ILiIiliL(!lLllLLIiiIIlliI4.iL());
if (z2) {
liLIllLIiilL = iLLLLiiIi.LiLIllLIiilL.IILiliI;
} else {
liLIllLIiilL = iiiIil.LIiIl;
}
iLLLLiiIi.LiLIllLIiilL liLIllLIiilL2 = liLIllLIiilL;
if (z2) {
lLllLLIiiIIlliI2 = lLllLLIiiIIlliI4;
lililiiiili = this.IiiLIIlLiLLlLL;
} else {
lLllLLIiiIIlliI2 = lLllLLIiiIIlliI4;
lililiiiili = iiiIil.iiilLllli;
}
iiliiiLliIL.liLILIIiILI lililiiiili2 = lililiiiili;
if (z2) {
ilLLll.iilLiiLliLIiI iilliilliliii = ilLLll.iI.Liil;
list = ilLLll.iilLLlLI.liliiiiLliIiLI;
} else {
list = iiiIil.IllLLLIil;
}
iiIilillliI iL3 = iiiIil.IiiLIIlLiLLlLL(lLllLLIiiIIlliI2, longValue, longValue, longValue, 0L, liLIllLIiilL2, lililiiiili2, list).iL(lLllLLIiiIIlliI2);
iL3.lllLL = longValue;
return iL3;
}
public final iiIilillliI l(int i2) {
boolean z;
boolean z2;
Pair Iili;
boolean z3;
ArrayList arrayList = this.LlllL;
if (i2 >= 0 && i2 <= arrayList.size()) {
z = true;
} else {
z = false;
}
Li.lliIllIlLlL.IllLLLIil(z);
int LIiIl = LIiIl();
liIIIiiLiilL iiLIIlIILiILilI = iiLIIlIILiILilI();
int size = arrayList.size();
this.f3974i++;
liliiiiLliIiLI(i2);
ilIliliiLLI ilililiilli = new ilIliliiLLI(arrayList, this.iLLiLlllLLi);
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
long lIlILilLLLlIi = lIlILilLLLlIi();
int i3 = -1;
if (!iiLIIlIILiILilI.lllLL() && !ilililiilli.lllLL()) {
Iili = iiLIIlIILiILilI.IllLLLIil(this.f4015iL, this.IiliIiIil, LIiIl(), LlIIlLiiIiilL.liLILIIiILI.llii(lIlILilLLLlIi));
Object obj = Iili.first;
if (ilililiilli.IiiLIIlLiLLlLL(obj) == -1) {
Object iLLiLlllLLi = IIlILIL.iLLiLlllLLi(this.f4015iL, this.IiliIiIil, 0, false, obj, iiLIIlIILiILilI, ilililiilli);
if (iLLiLlllLLi != null) {
IiiilI iiiilI = this.IiliIiIil;
ilililiilli.LIiIl(iLLiLlllLLi, iiiilI);
int i4 = iiiilI.IIll;
Iili = Iili(ilililiilli, i4, LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(ilililiilli.IiliIiIil(i4, this.f4015iL).LLIilI));
} else {
Iili = Iili(ilililiilli, -1, -9223372036854775807L);
}
}
} else {
if (!iiLIIlIILiILilI.lllLL() && ilililiilli.lllLL()) {
z2 = true;
} else {
z2 = false;
}
if (!z2) {
i3 = ILiIiliL();
}
if (z2) {
lIlILilLLLlIi = -9223372036854775807L;
}
Iili = Iili(ilililiilli, i3, lIlILilLLLlIi);
}
iiIilillliI illLlLIlllLILL = illLlLIlllLILL(iiiililllii, ilililiilli, Iili);
int i5 = illLlLIlllLILL.lIlILilLLLlIi;
if (i5 != 1 && i5 != 4 && i2 > 0 && i2 == size && LIiIl >= illLlLIlllLILL.f4023iL.iiL()) {
z3 = true;
} else {
z3 = false;
}
if (z3) {
illLlLIlllLILL = illLlLIlllLILL.IllLl(4);
}
iLLLLiiIi.LliIILliliil lliIILliliil = this.iLLiLlllLLi;
LlIIlLiiIiilL.ILIlIiLiilIlII iLIlIiLiilIlII = this.IiILLLILLilLl.lLLIIillILliIIL;
iLIlIiLiilIlII.getClass();
LlIIlLiiIiilL.liLLIllI IiiLIIlLiLLlLL = LlIIlLiiIiilL.ILIlIiLiilIlII.IiiLIIlLiLLlLL();
IiiLIIlLiLLlLL.f1149iL = iLIlIiLiilIlII.f1124iL.obtainMessage(20, 0, i2, lliIILliliil);
IiiLIIlLiLLlLL.iL();
return illLlLIlllLILL;
}
public final void lILLilLiLLilL(int i2, int i3, Object obj) {
llLiiILlllII[] llliiilllliiArr;
int i4;
for (llLiiILlllII llliiillllii : this.iiiIil) {
if (llliiillllii.f4055iL == i2) {
int ILiIiliL = ILiIiliL();
liIIIiiLiilL liiiiiiliill = this.ILIIiiLIiiLiL.f4023iL;
if (ILiIiliL == -1) {
i4 = 0;
} else {
i4 = ILiIiliL;
}
LlIIlLiiIiilL.LLllLLIiiIIlliI lLllLLIiiIIlliI = this.Liil;
IIlILIL iIlILIL = this.IiILLLILLilLl;
iIiillIIIlllil iiiilliiilllil = new iIiillIIIlllil(iIlILIL, llliiillllii, liiiiiiliill, i4, lLllLLIiiIIlliI, iIlILIL.il);
Li.lliIllIlLlL.ILiIiliL(!iiiilliiilllil.iiiIil);
iiiilliiilllil.IilIL = i3;
Li.lliIllIlLlL.ILiIiliL(!iiiilliiilllil.iiiIil);
iiiilliiilllil.lIlILilLLLlIi = obj;
iiiilliiilllil.lLi();
}
}
}
public final long lIlILilLLLlIi() {
IIiLILiLLiIlIiI();
if (lllLL()) {
iiIilillliI iiiililllii = this.ILIIiiLIiiLiL;
liIIIiiLiilL liiiiiiliill = iiiililllii.f4023iL;
Object obj = iiiililllii.IiiLIIlLiLLlLL.f3827iL;
IiiilI iiiilI = this.IiliIiIil;
liiiiiiliill.LIiIl(obj, iiiilI);
iiIilillliI iiiililllii2 = this.ILIIiiLIiiLiL;
if (iiiililllii2.f4025lLi == -9223372036854775807L) {
return LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(iiiililllii2.f4023iL.IiliIiIil(LIiIl(), this.f4015iL).LLIilI);
}
return LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(iiiilI.liliiiiLliIiLI) + LlIIlLiiIiilL.liLILIIiILI.LLlllILiLL(this.ILIIiiLIiiLiL.f4025lLi);
}
return IllLLLIil();
}
public final void lLLIIillILliIIL(List list) {
boolean z;
IIiLILiLLiIlIiI();
ILiIiliL();
IllLLLIil();
this.f3974i++;
ArrayList arrayList = this.LlllL;
if (!arrayList.isEmpty()) {
liliiiiLliIiLI(arrayList.size());
}
ArrayList arrayList2 = new ArrayList();
for (int i2 = 0; i2 < list.size(); i2++) {
IIiii iIiii = new IIiii((iLLLLiiIi.ILIlIiLiilIlII) list.get(i2), this.f3975iiL);
arrayList2.add(iIiii);
arrayList.add(i2 + 0, new LiiliI(iIiii.f3947iL.LlllL, iIiii.IiiLIIlLiLLlLL));
}
iLLLLiiIi.LliIILliliil iL2 = this.iLLiLlllLLi.iL(arrayList2.size());
this.iLLiLlllLLi = iL2;
ilIliliiLLI ilililiilli = new ilIliliiLLI(arrayList, iL2);
boolean lllLL = ilililiilli.lllLL();
int i3 = ilililiilli.IILiliI;
if (!lllLL && -1 >= i3) {
throw new iIlLILIiiL.iLlIlLlILiiIIi();
}
int iL3 = ilililiilli.iL(false);
iiIilillliI illLlLIlllLILL = illLlLIlllLILL(this.ILIIiiLIiiLiL, ilililiilli, Iili(ilililiilli, iL3, -9223372036854775807L));
int i4 = illLlLIlllLILL.lIlILilLLLlIi;
if (iL3 != -1 && i4 != 1) {
i4 = (ilililiilli.lllLL() || iL3 >= i3) ? 4 : 2;
}
iiIilillliI IllLl = illLlLIlllLILL.IllLl(i4);
this.IiILLLILLilLl.lLLIIillILliIIL.iL(17, new ILIlLIlilLLLl(arrayList2, this.iLLiLlllLLi, iL3, LlIIlLiiIiilL.liLILIIiILI.llii(-9223372036854775807L))).iL();
if (!this.ILIIiiLIiiLiL.IiiLIIlLiLLlLL.f3827iL.equals(IllLl.IiiLIIlLiLLlLL.f3827iL) && !this.ILIIiiLIiiLiL.f4023iL.lllLL()) {
z = true;
} else {
z = false;
}
LLlllILiLL(IllLl, 0, 1, false, z, 4, IiILLLILLilLl(IllLl), -1);
}
public final LIiiLi lLi() {
liIIIiiLiilL iiLIIlIILiILilI = iiLIIlIILiILilI();
if (iiLIIlIILiILilI.lllLL()) {
return this.LlILiIlIILl;
}
iLiILllil iliilllil = iiLIIlIILiILilI.IiliIiIil(LIiIl(), this.f4015iL).IIll;
LIiiLi lIiiLi = this.LlILiIlIILl;
lIiiLi.getClass();
LILLlLILIiilLLI lILLlLILIiilLLI = new LILLlLILIiilLLI(lIiiLi);
LIiiLi lIiiLi2 = iliilllil.IILiliI;
if (lIiiLi2 != null) {
CharSequence charSequence = lIiiLi2.f3972iL;
if (charSequence != null) {
lILLlLILIiilLLI.f3968iL = charSequence;
}
CharSequence charSequence2 = lIiiLi2.Liil;
if (charSequence2 != null) {
lILLlLILIiilLLI.IiiLIIlLiLLlLL = charSequence2;
}
CharSequence charSequence3 = lIiiLi2.IIll;
if (charSequence3 != null) {
lILLlLILIiilLLI.f3971lLi = charSequence3;
}
CharSequence charSequence4 = lIiiLi2.IILiliI;
if (charSequence4 != null) {
lILLlLILIiilLLI.IilIL = charSequence4;
}
CharSequence charSequence5 = lIiiLi2.liliiiiLliIiLI;
if (charSequence5 != null) {
lILLlLILIiilLLI.lIlILilLLLlIi = charSequence5;
}
CharSequence charSequence6 = lIiiLi2.ii;
if (charSequence6 != null) {
lILLlLILIiilLLI.IllLl = charSequence6;
}
CharSequence charSequence7 = lIiiLi2.lILLilLiLLilL;
if (charSequence7 != null) {
lILLlLILIiilLLI.iiiIil = charSequence7;
}
Uri uri = lIiiLi2.lLLIIillILliIIL;
if (uri != null) {
lILLlLILIiilLLI.LIiIl = uri;
}
iLiillIli iliillili = lIiiLi2.llii;
if (iliillili != null) {
lILLlLILIiilLLI.iiilLllli = iliillili;
}
iLiillIli iliillili2 = lIiiLi2.il;
if (iliillili2 != null) {
lILLlLILIiilLLI.IllLLLIil = iliillili2;
}
byte[] bArr = lIiiLi2.lilLLLliliiLI;
if (bArr != null) {
lILLlLILIiilLLI.IiILLLILLilLl = (byte[]) bArr.clone();
lILLlLILIiilLLI.iiLIIlIILiILilI = lIiiLi2.iIl;
}
Uri uri2 = lIiiLi2.LLIilI;
if (uri2 != null) {
lILLlLILIiilLLI.ILiIiliL = uri2;
}
Integer num = lIiiLi2.iLLiLlllLLi;
if (num != null) {
lILLlLILIiilLLI.IiliIiIil = num;
}
Integer num2 = lIiiLi2.LLlllILiLL;
if (num2 != null) {
lILLlLILIiilLLI.LlllL = num2;
}
Integer num3 = lIiiLi2.lLlII;
if (num3 != null) {
lILLlLILIiilLLI.f3969iiL = num3;
}
Boolean bool = lIiiLi2.IIiLILiLLiIlIiI;
if (bool != null) {
lILLlLILIiilLLI.lllLL = bool;
}
Integer num4 = lIiiLi2.IIlLiL;
if (num4 != null) {
lILLlLILIiilLLI.illLlLIlllLILL = num4;
}
Integer num5 = lIiiLi2.lLliLll;
if (num5 != null) {
lILLlLILIiilLLI.illLlLIlllLILL = num5;
}
Integer num6 = lIiiLi2.ilLLLiILLl;
if (num6 != null) {
lILLlLILIiilLLI.Iili = num6;
}
Integer num7 = lIiiLi2.ILIlilILIliLiLl;
if (num7 != null) {
lILLlLILIiilLLI.Liil = num7;
}
Integer num8 = lIiiLi2.iLiliilI;
if (num8 != null) {
lILLlLILIiilLLI.IIll = num8;
}
Integer num9 = lIiiLi2.iiIiIiIILli;
if (num9 != null) {
lILLlLILIiilLLI.IILiliI = num9;
}
Integer num10 = lIiiLi2.iLLILLiIIl;
if (num10 != null) {
lILLlLILIiilLLI.f3970l = num10;
}
CharSequence charSequence8 = lIiiLi2.lliIii;
if (charSequence8 != null) {
lILLlLILIiilLLI.liliiiiLliIiLI = charSequence8;
}
CharSequence charSequence9 = lIiiLi2.llliIL;
if (charSequence9 != null) {
lILLlLILIiilLLI.ii = charSequence9;
}
CharSequence charSequence10 = lIiiLi2.LlIIiIiIII;
if (charSequence10 != null) {
lILLlLILIiilLLI.lILLilLiLLilL = charSequence10;
}
Integer num11 = lIiiLi2.f3973lI;
if (num11 != null) {
lILLlLILIiilLLI.lLLIIillILliIIL = num11;
}
Integer num12 = lIiiLi2.LLlIiIILLiLli;
if (num12 != null) {
lILLlLILIiilLLI.llii = num12;
}
CharSequence charSequence11 = lIiiLi2.lllIL;
if (charSequence11 != null) {
lILLlLILIiilLLI.f3967i = charSequence11;
}
CharSequence charSequence12 = lIiiLi2.iiiilIllLllLll;
if (charSequence12 != null) {
lILLlLILIiilLLI.il = charSequence12;
}
CharSequence charSequence13 = lIiiLi2.iIliLiilIIlilil;
if (charSequence13 != null) {
lILLlLILIiilLLI.lilLLLliliiLI = charSequence13;
}
Bundle bundle = lIiiLi2.lILl;
if (bundle != null) {
lILLlLILIiilLLI.iIl = bundle;
}
}
return new LIiiLi(lILLlLILIiilLLI);
}
public final void lLlII() {
IIiLILiLLiIlIiI();
int i2 = this.ILIIiiLIiiLiL.lIlILilLLLlIi;
IililiIiIlliL iililiIiIlliL = this.lLLIIillILliIIL;
IililiIiIlliL iililiIiIlliL2 = this.lILLilLiLLilL;
boolean z = true;
if (i2 != 1) {
if (i2 != 2 && i2 != 3) {
if (i2 != 4) {
throw new IllegalStateException();
}
} else {
IIiLILiLLiIlIiI();
boolean z2 = this.ILIIiiLIiiLiL.f4024iiL;
IIiLILiLLiIlIiI();
if (!this.ILIIiiLIiiLiL.iiLIIlIILiILilI || z2) {
z = false;
}
iililiIiIlliL2.IllLl(z);
IIiLILiLLiIlIiI();
iililiIiIlliL.IllLl(this.ILIIiiLIiiLiL.iiLIIlIILiILilI);
return;
}
}
iililiIiIlliL2.IllLl(false);
iililiIiIlliL.IllLl(false);
}
public final void lilLLLliliiLI(TextureView textureView) {
SurfaceTexture surfaceTexture;
IIiLILiLLiIlIiI();
if (textureView == null) {
IIiLILiLLiIlIiI();
ii();
i(null);
Liil(0, 0);
return;
}
ii();
this.iLiliilI = textureView;
if (textureView.getSurfaceTextureListener() != null) {
Log.w("ExoPlayerImpl", "Replacing existing SurfaceTextureListener.");
}
textureView.setSurfaceTextureListener(this.IIll);
if (textureView.isAvailable()) {
surfaceTexture = textureView.getSurfaceTexture();
} else {
surfaceTexture = null;
}
if (surfaceTexture == null) {
i(null);
Liil(0, 0);
return;
}
Surface surface = new Surface(surfaceTexture);
i(surface);
this.lLliLll = surface;
Liil(textureView.getWidth(), textureView.getHeight());
}
public final void liliiiiLliIiLI(int i2) {
for (int i3 = i2 - 1; i3 >= 0; i3--) {
this.LlllL.remove(i3);
}
iLLLLiiIi.LliIILliliil lliIILliliil = this.iLLiLlllLLi;
int i4 = i2 + 0;
int[] iArr = lliIILliliil.IiiLIIlLiLLlLL;
int[] iArr2 = new int[iArr.length - i4];
int i5 = 0;
for (int i6 = 0; i6 < iArr.length; i6++) {
int i7 = iArr[i6];
if (i7 >= 0 && i7 < i2) {
i5++;
} else {
int i8 = i6 - i5;
if (i7 >= 0) {
i7 -= i4;
}
iArr2[i8] = i7;
}
}
this.iLLiLlllLLi = new iLLLLiiIi.LliIILliliil(iArr2, new Random(lliIILliliil.f3842iL.nextLong()));
}
public final void llii(boolean z) {
IIiLILiLLiIlIiI();
IIiLILiLLiIlIiI();
int lIlILilLLLlIi = this.liliiiiLliIiLI.lIlILilLLLlIi(this.ILIIiiLIiiLiL.lIlILilLLLlIi, z);
int i2 = 1;
if (z && lIlILilLLLlIi != 1) {
i2 = 2;
}
iLLiLlllLLi(lIlILilLLLlIi, i2, z);
}
public final boolean lllLL() {
IIiLILiLLiIlIiI();
return this.ILIIiiLIiiLiL.IiiLIIlLiLLlLL.iL();
}
}