APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Shopping List
版本号:2.74
包名称:com.icedblueberry.shoppinglisteasy

MD5 校验值:8005b9444b02324a81f85f1ef7e26f28

反编译源代码说明

jg2.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package m5;

import android.content.Context;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.os.Handler;
import android.os.Looper;
import android.util.Pair;
import android.util.SparseBooleanArray;
import android.view.Surface;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.TimeoutException;

public final class jg2 extends di2 {
    public static final int Y = 0;
    public boolean A;
    public int B;
    public lh2 C;
    public n40 D;
    public ps E;
    public AudioTrack F;
    public Object G;
    public Surface H;
    public int I;
    public int J;
    public int K;
    public int L;
    public jh2 M;
    public float N;
    public boolean O;
    public boolean P;
    public boolean Q;
    public an2 R;
    public ps S;
    public dh2 T;
    public int U;
    public long V;
    public final h6 W;
    public rn2 X;

    public final gp2 f12746b;

    public final n40 f12747c;

    public final wn0 f12748d = new wn0();

    public final Context f12749e;

    public final di2 f12750f;

    public final s52[] f12751g;

    public final ep2 f12752h;

    public final or0 f12753i;
    public final qg2 j;

    public final uu0 f12754k;

    public final CopyOnWriteArraySet f12755l;

    public final fa0 f12756m;

    public final ArrayList f12757n;

    public final boolean f12758o;

    public final fi2 f12759p;

    public final Looper f12760q;

    public final op2 f12761r;

    public final a21 f12762s;

    public final gg2 f12763t;

    public final hg2 f12764u;
    public final c52 v;

    public final qh2 f12765w;

    public final long f12766x;

    public int f12767y;

    public int f12768z;

    static {
        mo.a("media3.exoplayer");
    }

    public jg2(tf2 tf2Var, di2 di2Var) {
        mi2 a10;
        try {
            Integer.toHexString(System.identityHashCode(this));
            int i10 = q61.f15497a;
            synchronized (pw0.f15412a) {
            }
            this.f12749e = tf2Var.f16675a.getApplicationContext();
            this.f12759p = new fi2(tf2Var.f16676b);
            this.M = tf2Var.f16683i;
            this.I = tf2Var.j;
            this.O = false;
            this.f12766x = tf2Var.f16687n;
            gg2 gg2Var = new gg2(this);
            this.f12763t = gg2Var;
            this.f12764u = new hg2();
            Handler handler = new Handler(tf2Var.f16682h);
            this.f12751g = tf2Var.f16677c.f17699s.b(handler, gg2Var, gg2Var);
            this.f12752h = (ep2) tf2Var.f16679e.mo7a();
            new v12(tf2Var.f16678d.f14307s);
            HashMap hashMap = new HashMap();
            new HashSet();
            HashMap hashMap2 = new HashMap();
            hashMap.clear();
            hashMap2.clear();
            this.f12761r = op2.a(tf2Var.f16681g.f16328s);
            this.f12758o = tf2Var.f16684k;
            this.C = tf2Var.f16685l;
            Looper looper = tf2Var.f16682h;
            this.f12760q = looper;
            a21 a21Var = tf2Var.f16676b;
            this.f12762s = a21Var;
            this.f12750f = di2Var;
            this.f12754k = new uu0(looper, a21Var, new pl0(13, this));
            this.f12755l = new CopyOnWriteArraySet();
            this.f12757n = new ArrayList();
            this.X = new rn2();
            this.f12746b = new gp2(new kh2[2], new yo2[2], zi0.f18812b, null);
            this.f12756m = new fa0();
            SparseBooleanArray sparseBooleanArray = new SparseBooleanArray();
            int i11 = 12;
            int[] iArr = {1, 2, 3, 13, 14, 15, 16, 17, 18, 19, 31, 20, 30, 21, 22, 23, 24, 25, 26, 27, 28};
            for (int i12 = 0; i12 < 21; i12++) {
                int i13 = iArr[i12];
                fx1.H(!false);
                sparseBooleanArray.append(i13, true);
            }
            this.f12752h.c();
            fx1.H(!false);
            sparseBooleanArray.append(29, true);
            fx1.H(!false);
            a aVar = new a(sparseBooleanArray);
            this.f12747c = new n40(aVar);
            SparseBooleanArray sparseBooleanArray2 = new SparseBooleanArray();
            for (int i14 = 0; i14 < aVar.b(); i14++) {
                int a11 = aVar.a(i14);
                fx1.H(!false);
                sparseBooleanArray2.append(a11, true);
            }
            fx1.H(!false);
            sparseBooleanArray2.append(4, true);
            fx1.H(!false);
            sparseBooleanArray2.append(10, true);
            fx1.H(!false);
            this.D = new n40(new a(sparseBooleanArray2));
            this.f12753i = this.f12762s.b(this.f12760q, null);
            h6 h6Var = new h6(i11, this);
            this.W = h6Var;
            this.T = dh2.g(this.f12746b);
            this.f12759p.d(this.f12750f, this.f12760q);
            int i15 = q61.f15497a;
            if (i15 < 31) {
                a10 = new mi2();
            } else {
                a10 = cg2.a(this.f12749e, this, tf2Var.f16688o);
            }
            this.j = new qg2(this.f12751g, this.f12752h, this.f12746b, (sg2) tf2Var.f16680f.mo7a(), this.f12761r, this.f12759p, this.C, tf2Var.f16690q, tf2Var.f16686m, this.f12760q, this.f12762s, h6Var, a10);
            this.N = 1.0f;
            ps psVar = ps.v;
            this.E = psVar;
            this.S = psVar;
            int i16 = -1;
            this.U = -1;
            if (i15 < 21) {
                AudioTrack audioTrack = this.F;
                if (audioTrack != null && audioTrack.getAudioSessionId() != 0) {
                    this.F.release();
                    this.F = null;
                }
                if (this.F == null) {
                    this.F = new AudioTrack(3, 4000, 4, 2, 2, 0, 0);
                }
                this.L = this.F.getAudioSessionId();
            } else {
                AudioManager audioManager = (AudioManager) this.f12749e.getSystemService("audio");
                if (audioManager != null) {
                    i16 = audioManager.generateAudioSessionId();
                }
                this.L = i16;
            }
            int i17 = ul0.f17074a;
            this.P = true;
            fi2 fi2Var = this.f12759p;
            uu0 uu0Var = this.f12754k;
            fi2Var.getClass();
            if (!uu0Var.f17144g) {
                uu0Var.f17141d.add(new bu0(fi2Var));
            }
            op2 op2Var = this.f12761r;
            Handler handler2 = new Handler(this.f12760q);
            fi2 fi2Var2 = this.f12759p;
            op2Var.getClass();
            fi2Var2.getClass();
            kp2 kp2Var = op2Var.f14847t;
            kp2Var.a(fi2Var2);
            kp2Var.f13323a.add(new jp2(handler2, fi2Var2));
            this.f12755l.add(this.f12763t);
            tf2Var.f16675a.getApplicationContext();
            new f12(handler);
            this.v = new c52(tf2Var.f16675a, handler, this.f12763t);
            q61.e(null, null);
            qh2 qh2Var = new qh2(tf2Var.f16675a, handler, this.f12763t);
            this.f12765w = qh2Var;
            this.M.getClass();
            qh2Var.a();
            this.R = t(qh2Var);
            this.f12752h.b(this.M);
            x(1, 10, Integer.valueOf(this.L));
            x(2, 10, Integer.valueOf(this.L));
            x(1, 3, this.M);
            x(2, 4, Integer.valueOf(this.I));
            x(2, 5, 0);
            x(1, 9, Boolean.valueOf(this.O));
            x(2, 7, this.f12764u);
            x(6, 8, this.f12764u);
        } finally {
            this.f12748d.b();
        }
    }

    public static boolean D(dh2 dh2Var) {
        return dh2Var.f10441e == 3 && dh2Var.f10447l && dh2Var.f10448m == 0;
    }

    public static long r(dh2 dh2Var) {
        nb0 nb0Var = new nb0();
        fa0 fa0Var = new fa0();
        dh2Var.f10437a.n(dh2Var.f10438b.f12889a, fa0Var);
        long j = dh2Var.f10439c;
        if (j == -9223372036854775807L) {
            dh2Var.f10437a.e(fa0Var.f11324c, nb0Var, 0L).getClass();
            return 0L;
        }
        return j;
    }

    public static an2 t(qh2 qh2Var) {
        int i10;
        qh2Var.getClass();
        if (q61.f15497a >= 28) {
            i10 = qh2Var.f15629d.getStreamMinVolume(qh2Var.f15631f);
        } else {
            i10 = 0;
        }
        return new an2(i10, qh2Var.f15629d.getStreamMaxVolume(qh2Var.f15631f));
    }

    public final void A(int i10, boolean z10, int i11) {
        ?? r32;
        int i12 = 0;
        if (z10 && i10 != -1) {
            r32 = 1;
        } else {
            r32 = 0;
        }
        if (r32 != 0 && i10 != 1) {
            i12 = 1;
        }
        dh2 dh2Var = this.T;
        if (dh2Var.f10447l == r32 && dh2Var.f10448m == i12) {
            return;
        }
        this.f12767y++;
        dh2 c10 = dh2Var.c(i12, r32);
        y31 y31Var = (y31) this.j.f15617z;
        y31Var.getClass();
        h31 c11 = y31.c();
        c11.f11961a = y31Var.f18326a.obtainMessage(1, r32, i12);
        c11.a();
        B(c10, 0, i11, false, false, 5, -9223372036854775807L, -1);
    }

    public final void B(final dh2 dh2Var, final int i10, final int i11, boolean z10, boolean z11, int i12, long j, int i13) {
        Pair pair;
        int i14;
        wn wnVar;
        boolean z12;
        boolean z13;
        int e10;
        boolean z14;
        boolean z15;
        boolean z16;
        boolean z17;
        boolean z18;
        gc0 k10;
        boolean z19;
        gc0 k11;
        boolean z20;
        gc0 k12;
        di2 di2Var;
        boolean z21;
        boolean o10;
        a aVar;
        int i15;
        boolean z22;
        boolean z23;
        boolean z24;
        boolean z25;
        boolean z26;
        boolean z27;
        boolean z28;
        boolean z29;
        n40 n40Var;
        int i16;
        Object obj;
        wn wnVar2;
        Object obj2;
        int i17;
        long j10;
        long r10;
        Object obj3;
        wn wnVar3;
        Object obj4;
        int i18;
        long j11;
        dh2 dh2Var2 = this.T;
        this.T = dh2Var;
        boolean z30 = !dh2Var2.f10437a.equals(dh2Var.f10437a);
        gc0 gc0Var = dh2Var2.f10437a;
        gc0 gc0Var2 = dh2Var.f10437a;
        if (gc0Var2.o() && gc0Var.o()) {
            pair = new Pair(Boolean.FALSE, -1);
        } else if (gc0Var2.o() != gc0Var.o()) {
            pair = new Pair(Boolean.TRUE, 3);
        } else if (!gc0Var.e(gc0Var.n(dh2Var2.f10438b.f12889a, this.f12756m).f11324c, this.f10457a, 0L).f14263a.equals(gc0Var2.e(gc0Var2.n(dh2Var.f10438b.f12889a, this.f12756m).f11324c, this.f10457a, 0L).f14263a)) {
            if (z11 && i12 == 0) {
                i14 = 1;
            } else if (z11 && i12 == 1) {
                i14 = 2;
            } else if (z30) {
                i14 = 3;
            } else {
                throw new IllegalStateException();
            }
            pair = new Pair(Boolean.TRUE, Integer.valueOf(i14));
        } else if (z11 && i12 == 0 && dh2Var2.f10438b.f12892d < dh2Var.f10438b.f12892d) {
            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();
        ps psVar = this.E;
        if (booleanValue) {
            if (!dh2Var.f10437a.o()) {
                wnVar = dh2Var.f10437a.e(dh2Var.f10437a.n(dh2Var.f10438b.f12889a, this.f12756m).f11324c, this.f10457a, 0L).f14264b;
            } else {
                wnVar = null;
            }
            this.S = ps.v;
        } else {
            wnVar = null;
        }
        if (booleanValue || !dh2Var2.j.equals(dh2Var.j)) {
            ps psVar2 = this.S;
            psVar2.getClass();
            tq tqVar = new tq(psVar2);
            List list = dh2Var.j;
            for (int i19 = 0; i19 < list.size(); i19++) {
                wv wvVar = (wv) list.get(i19);
                int i20 = 0;
                while (true) {
                    bv[] bvVarArr = wvVar.f17845s;
                    if (i20 < bvVarArr.length) {
                        bvVarArr[i20].F(tqVar);
                        i20++;
                    }
                }
            }
            this.S = new ps(tqVar);
            gc0 k13 = k();
            if (k13.o()) {
                psVar = this.S;
            } else {
                wn wnVar4 = k13.e(c(), this.f10457a, 0L).f14264b;
                ps psVar3 = this.S;
                psVar3.getClass();
                tq tqVar2 = new tq(psVar3);
                ps psVar4 = wnVar4.f17802d;
                CharSequence charSequence = psVar4.f15362a;
                if (charSequence != null) {
                    tqVar2.f16786a = charSequence;
                }
                CharSequence charSequence2 = psVar4.f15363b;
                if (charSequence2 != null) {
                    tqVar2.f16787b = charSequence2;
                }
                CharSequence charSequence3 = psVar4.f15364c;
                if (charSequence3 != null) {
                    tqVar2.f16788c = charSequence3;
                }
                CharSequence charSequence4 = psVar4.f15365d;
                if (charSequence4 != null) {
                    tqVar2.f16789d = charSequence4;
                }
                CharSequence charSequence5 = psVar4.f15366e;
                if (charSequence5 != null) {
                    tqVar2.f16790e = charSequence5;
                }
                byte[] bArr = psVar4.f15367f;
                if (bArr != null) {
                    Integer num = psVar4.f15368g;
                    tqVar2.f16791f = (byte[]) bArr.clone();
                    tqVar2.f16792g = num;
                }
                Integer num2 = psVar4.f15369h;
                if (num2 != null) {
                    tqVar2.f16793h = num2;
                }
                Integer num3 = psVar4.f15370i;
                if (num3 != null) {
                    tqVar2.f16794i = num3;
                }
                Integer num4 = psVar4.j;
                if (num4 != null) {
                    tqVar2.j = num4;
                }
                Integer num5 = psVar4.f15371k;
                if (num5 != null) {
                    tqVar2.j = num5;
                }
                Integer num6 = psVar4.f15372l;
                if (num6 != null) {
                    tqVar2.f16795k = num6;
                }
                Integer num7 = psVar4.f15373m;
                if (num7 != null) {
                    tqVar2.f16796l = num7;
                }
                Integer num8 = psVar4.f15374n;
                if (num8 != null) {
                    tqVar2.f16797m = num8;
                }
                Integer num9 = psVar4.f15375o;
                if (num9 != null) {
                    tqVar2.f16798n = num9;
                }
                Integer num10 = psVar4.f15376p;
                if (num10 != null) {
                    tqVar2.f16799o = num10;
                }
                CharSequence charSequence6 = psVar4.f15377q;
                if (charSequence6 != null) {
                    tqVar2.f16800p = charSequence6;
                }
                CharSequence charSequence7 = psVar4.f15378r;
                if (charSequence7 != null) {
                    tqVar2.f16801q = charSequence7;
                }
                CharSequence charSequence8 = psVar4.f15379s;
                if (charSequence8 != null) {
                    tqVar2.f16802r = charSequence8;
                }
                CharSequence charSequence9 = psVar4.f15380t;
                if (charSequence9 != null) {
                    tqVar2.f16803s = charSequence9;
                }
                CharSequence charSequence10 = psVar4.f15381u;
                if (charSequence10 != null) {
                    tqVar2.f16804t = charSequence10;
                }
                psVar = new ps(tqVar2);
            }
        }
        boolean z31 = !psVar.equals(this.E);
        this.E = psVar;
        if (dh2Var2.f10447l != dh2Var.f10447l) {
            z12 = true;
        } else {
            z12 = false;
        }
        if (dh2Var2.f10441e != dh2Var.f10441e) {
            z13 = true;
        } else {
            z13 = false;
        }
        if ((z13 || z12) && ((e10 = e()) == 2 || e10 == 3)) {
            C();
            boolean z32 = this.T.f10450o;
            m();
            m();
        }
        if (dh2Var2.f10443g != dh2Var.f10443g) {
            z14 = true;
        } else {
            z14 = false;
        }
        if (z30) {
            this.f12754k.b(0, new xs0() {
                @Override
                public final void mo8d(Object obj5) {
                    dh2 dh2Var3 = dh2.this;
                    int i21 = i10;
                    int i22 = jg2.Y;
                    gc0 gc0Var3 = dh2Var3.f10437a;
                    ((g50) obj5).m(i21);
                }
            });
        }
        if (z11) {
            fa0 fa0Var = new fa0();
            if (!dh2Var2.f10437a.o()) {
                Object obj5 = dh2Var2.f10438b.f12889a;
                dh2Var2.f10437a.n(obj5, fa0Var);
                int i21 = fa0Var.f11324c;
                int a10 = dh2Var2.f10437a.a(obj5);
                z15 = z12;
                z16 = z14;
                obj2 = obj5;
                obj = dh2Var2.f10437a.e(i21, this.f10457a, 0L).f14263a;
                wnVar2 = this.f10457a.f14264b;
                i16 = i21;
                i17 = a10;
            } else {
                z15 = z12;
                z16 = z14;
                i16 = i13;
                obj = null;
                wnVar2 = null;
                obj2 = null;
                i17 = -1;
            }
            if (i12 == 0) {
                if (dh2Var2.f10438b.a()) {
                    km2 km2Var = dh2Var2.f10438b;
                    j10 = fa0Var.b(km2Var.f12890b, km2Var.f12891c);
                    r10 = r(dh2Var2);
                    long z33 = q61.z(j10);
                    km2 km2Var2 = dh2Var2.f10438b;
                    t60 t60Var = new t60(obj, i16, wnVar2, obj2, i17, z33, q61.z(r10), km2Var2.f12890b, km2Var2.f12891c);
                    int c10 = c();
                    if (this.T.f10437a.o()) {
                        dh2 dh2Var3 = this.T;
                        Object obj6 = dh2Var3.f10438b.f12889a;
                        dh2Var3.f10437a.n(obj6, this.f12756m);
                        i18 = this.T.f10437a.a(obj6);
                        obj3 = this.T.f10437a.e(c10, this.f10457a, 0L).f14263a;
                        wnVar3 = this.f10457a.f14264b;
                        obj4 = obj6;
                    } else {
                        obj3 = null;
                        wnVar3 = null;
                        obj4 = null;
                        i18 = -1;
                    }
                    long z34 = q61.z(j);
                    if (!this.T.f10438b.a()) {
                        j11 = q61.z(r(this.T));
                    } else {
                        j11 = z34;
                    }
                    km2 km2Var3 = this.T.f10438b;
                    this.f12754k.b(11, new zf2(i12, t60Var, new t60(obj3, c10, wnVar3, obj4, i18, z34, j11, km2Var3.f12890b, km2Var3.f12891c)));
                } else {
                    if (dh2Var2.f10438b.f12893e != -1) {
                        j10 = r(this.T);
                    } else {
                        j10 = fa0Var.f11325d;
                    }
                    r10 = j10;
                    long z332 = q61.z(j10);
                    km2 km2Var22 = dh2Var2.f10438b;
                    t60 t60Var2 = new t60(obj, i16, wnVar2, obj2, i17, z332, q61.z(r10), km2Var22.f12890b, km2Var22.f12891c);
                    int c102 = c();
                    if (this.T.f10437a.o()) {
                    }
                    long z342 = q61.z(j);
                    if (!this.T.f10438b.a()) {
                    }
                    km2 km2Var32 = this.T.f10438b;
                    this.f12754k.b(11, new zf2(i12, t60Var2, new t60(obj3, c102, wnVar3, obj4, i18, z342, j11, km2Var32.f12890b, km2Var32.f12891c)));
                }
            } else if (dh2Var2.f10438b.a()) {
                j10 = dh2Var2.f10453r;
                r10 = r(dh2Var2);
                long z3322 = q61.z(j10);
                km2 km2Var222 = dh2Var2.f10438b;
                t60 t60Var22 = new t60(obj, i16, wnVar2, obj2, i17, z3322, q61.z(r10), km2Var222.f12890b, km2Var222.f12891c);
                int c1022 = c();
                if (this.T.f10437a.o()) {
                }
                long z3422 = q61.z(j);
                if (!this.T.f10438b.a()) {
                }
                km2 km2Var322 = this.T.f10438b;
                this.f12754k.b(11, new zf2(i12, t60Var22, new t60(obj3, c1022, wnVar3, obj4, i18, z3422, j11, km2Var322.f12890b, km2Var322.f12891c)));
            } else {
                j10 = dh2Var2.f10453r;
                r10 = j10;
                long z33222 = q61.z(j10);
                km2 km2Var2222 = dh2Var2.f10438b;
                t60 t60Var222 = new t60(obj, i16, wnVar2, obj2, i17, z33222, q61.z(r10), km2Var2222.f12890b, km2Var2222.f12891c);
                int c10222 = c();
                if (this.T.f10437a.o()) {
                }
                long z34222 = q61.z(j);
                if (!this.T.f10438b.a()) {
                }
                km2 km2Var3222 = this.T.f10438b;
                this.f12754k.b(11, new zf2(i12, t60Var222, new t60(obj3, c10222, wnVar3, obj4, i18, z34222, j11, km2Var3222.f12890b, km2Var3222.f12891c)));
            }
        } else {
            z15 = z12;
            z16 = z14;
        }
        if (booleanValue) {
            this.f12754k.b(1, new hi(intValue, wnVar));
        }
        int i22 = 12;
        if (dh2Var2.f10442f != dh2Var.f10442f) {
            this.f12754k.b(10, new b(i22, dh2Var));
            if (dh2Var.f10442f != null) {
                this.f12754k.b(10, new zc(11, dh2Var));
            }
        }
        gp2 gp2Var = dh2Var2.f10445i;
        gp2 gp2Var2 = dh2Var.f10445i;
        int i23 = 17;
        if (gp2Var != gp2Var2) {
            this.f12752h.e(gp2Var2.f11856e);
            this.f12754k.b(2, new gg0(i23, dh2Var));
        }
        int i24 = 14;
        if (z31) {
            this.f12754k.b(14, new la(i22, this.E));
        }
        if (z16) {
            this.f12754k.b(3, new hm0(i23, dh2Var));
        }
        if (z13 || z15) {
            this.f12754k.b(-1, new c91(21, dh2Var));
        }
        int i25 = 9;
        if (z13) {
            this.f12754k.b(4, new u7(i25, dh2Var));
        }
        if (z15) {
            this.f12754k.b(5, new xs0() {
                @Override
                public final void mo8d(Object obj7) {
                    dh2 dh2Var4 = dh2.this;
                    int i26 = i11;
                    int i27 = jg2.Y;
                    ((g50) obj7).p(i26, dh2Var4.f10447l);
                }
            });
        }
        if (dh2Var2.f10448m != dh2Var.f10448m) {
            this.f12754k.b(6, new nf1(i24, dh2Var));
        }
        if (D(dh2Var2) != D(dh2Var)) {
            this.f12754k.b(7, new dy1(i24, dh2Var));
        }
        if (!dh2Var2.f10449n.equals(dh2Var.f10449n)) {
            this.f12754k.b(12, new pl0(i22, dh2Var));
        }
        if (z10) {
            this.f12754k.b(-1, new xs0() {
                @Override
                public final void mo8d(Object obj7) {
                    ((g50) obj7).l();
                }
            });
        }
        n40 n40Var2 = this.D;
        di2 di2Var2 = this.f12750f;
        n40 n40Var3 = this.f12747c;
        int i26 = q61.f15497a;
        boolean o11 = di2Var2.o();
        gc0 k14 = di2Var2.k();
        if (!k14.o() && k14.e(di2Var2.c(), di2Var2.f10457a, 0L).f14268f) {
            z17 = true;
        } else {
            z17 = false;
        }
        gc0 k15 = di2Var2.k();
        if (!k15.o()) {
            int c11 = di2Var2.c();
            di2Var2.g();
            di2Var2.n();
            if (k15.k(c11) != -1) {
                z18 = true;
                k10 = di2Var2.k();
                if (k10.o()) {
                    int c12 = di2Var2.c();
                    di2Var2.g();
                    di2Var2.n();
                    if (k10.j(c12, false, 0) != -1) {
                        z19 = true;
                        k11 = di2Var2.k();
                        if (k11.o() && k11.e(di2Var2.c(), di2Var2.f10457a, 0L).b()) {
                            z20 = true;
                        } else {
                            z20 = false;
                        }
                        k12 = di2Var2.k();
                        if (!k12.o()) {
                            di2Var = di2Var2;
                            if (k12.e(di2Var2.c(), di2Var2.f10457a, 0L).f14269g) {
                                z21 = true;
                                o10 = di2Var.k().o();
                                qq2 qq2Var = new qq2();
                                aVar = n40Var3.f14191a;
                                for (i15 = 0; i15 < aVar.b(); i15++) {
                                    qq2Var.a(aVar.a(i15));
                                }
                                z22 = !o11;
                                if (z22) {
                                    qq2Var.a(4);
                                }
                                if (!z17 && !o11) {
                                    z23 = true;
                                } else {
                                    z23 = false;
                                }
                                if (z23) {
                                    qq2Var.a(5);
                                }
                                if (!z18 && !o11) {
                                    z24 = true;
                                } else {
                                    z24 = false;
                                }
                                if (z24) {
                                    qq2Var.a(6);
                                }
                                if (o10 && ((z18 || !z20 || z17) && !o11)) {
                                    z25 = true;
                                } else {
                                    z25 = false;
                                }
                                if (z25) {
                                    qq2Var.a(7);
                                }
                                if (!z19 && !o11) {
                                    z26 = true;
                                } else {
                                    z26 = false;
                                }
                                if (z26) {
                                    qq2Var.a(8);
                                }
                                if (o10 && ((z19 || (z20 && z21)) && !o11)) {
                                    z27 = true;
                                } else {
                                    z27 = false;
                                }
                                if (z27) {
                                    qq2Var.a(9);
                                }
                                if (z22) {
                                    qq2Var.a(10);
                                }
                                if (!z17 && !o11) {
                                    z28 = true;
                                } else {
                                    z28 = false;
                                }
                                if (z28) {
                                    qq2Var.a(11);
                                }
                                if (!z17 && !o11) {
                                    z29 = true;
                                } else {
                                    z29 = false;
                                }
                                if (z29) {
                                    qq2Var.a(12);
                                }
                                n40Var = new n40(qq2Var.b());
                                this.D = n40Var;
                                if (!n40Var.equals(n40Var2)) {
                                    this.f12754k.b(13, new dy1(15, this));
                                }
                                this.f12754k.a();
                                if (dh2Var2.f10450o == dh2Var.f10450o) {
                                    Iterator it = this.f12755l.iterator();
                                    while (it.hasNext()) {
                                        ((rc2) it.next()).a();
                                    }
                                    return;
                                }
                                return;
                            }
                        } else {
                            di2Var = di2Var2;
                        }
                        z21 = false;
                        o10 = di2Var.k().o();
                        qq2 qq2Var2 = new qq2();
                        aVar = n40Var3.f14191a;
                        while (i15 < aVar.b()) {
                        }
                        z22 = !o11;
                        if (z22) {
                        }
                        if (!z17) {
                        }
                        z23 = false;
                        if (z23) {
                        }
                        if (!z18) {
                        }
                        z24 = false;
                        if (z24) {
                        }
                        if (o10) {
                        }
                        z25 = false;
                        if (z25) {
                        }
                        if (!z19) {
                        }
                        z26 = false;
                        if (z26) {
                        }
                        if (o10) {
                        }
                        z27 = false;
                        if (z27) {
                        }
                        if (z22) {
                        }
                        if (!z17) {
                        }
                        z28 = false;
                        if (z28) {
                        }
                        if (!z17) {
                        }
                        z29 = false;
                        if (z29) {
                        }
                        n40Var = new n40(qq2Var2.b());
                        this.D = n40Var;
                        if (!n40Var.equals(n40Var2)) {
                        }
                        this.f12754k.a();
                        if (dh2Var2.f10450o == dh2Var.f10450o) {
                        }
                    }
                }
                z19 = false;
                k11 = di2Var2.k();
                if (k11.o()) {
                }
                z20 = false;
                k12 = di2Var2.k();
                if (!k12.o()) {
                }
                z21 = false;
                o10 = di2Var.k().o();
                qq2 qq2Var22 = new qq2();
                aVar = n40Var3.f14191a;
                while (i15 < aVar.b()) {
                }
                z22 = !o11;
                if (z22) {
                }
                if (!z17) {
                }
                z23 = false;
                if (z23) {
                }
                if (!z18) {
                }
                z24 = false;
                if (z24) {
                }
                if (o10) {
                }
                z25 = false;
                if (z25) {
                }
                if (!z19) {
                }
                z26 = false;
                if (z26) {
                }
                if (o10) {
                }
                z27 = false;
                if (z27) {
                }
                if (z22) {
                }
                if (!z17) {
                }
                z28 = false;
                if (z28) {
                }
                if (!z17) {
                }
                z29 = false;
                if (z29) {
                }
                n40Var = new n40(qq2Var22.b());
                this.D = n40Var;
                if (!n40Var.equals(n40Var2)) {
                }
                this.f12754k.a();
                if (dh2Var2.f10450o == dh2Var.f10450o) {
                }
            }
        }
        z18 = false;
        k10 = di2Var2.k();
        if (k10.o()) {
        }
        z19 = false;
        k11 = di2Var2.k();
        if (k11.o()) {
        }
        z20 = false;
        k12 = di2Var2.k();
        if (!k12.o()) {
        }
        z21 = false;
        o10 = di2Var.k().o();
        qq2 qq2Var222 = new qq2();
        aVar = n40Var3.f14191a;
        while (i15 < aVar.b()) {
        }
        z22 = !o11;
        if (z22) {
        }
        if (!z17) {
        }
        z23 = false;
        if (z23) {
        }
        if (!z18) {
        }
        z24 = false;
        if (z24) {
        }
        if (o10) {
        }
        z25 = false;
        if (z25) {
        }
        if (!z19) {
        }
        z26 = false;
        if (z26) {
        }
        if (o10) {
        }
        z27 = false;
        if (z27) {
        }
        if (z22) {
        }
        if (!z17) {
        }
        z28 = false;
        if (z28) {
        }
        if (!z17) {
        }
        z29 = false;
        if (z29) {
        }
        n40Var = new n40(qq2Var222.b());
        this.D = n40Var;
        if (!n40Var.equals(n40Var2)) {
        }
        this.f12754k.a();
        if (dh2Var2.f10450o == dh2Var.f10450o) {
        }
    }

    public final void C() {
        IllegalStateException illegalStateException;
        this.f12748d.a();
        if (Thread.currentThread() != this.f12760q.getThread()) {
            Object[] objArr = {Thread.currentThread().getName(), this.f12760q.getThread().getName()};
            int i10 = q61.f15497a;
            String format = String.format(Locale.US, "Player is accessed on the wrong thread.\nCurrent thread: '%s'\nExpected thread: '%s'\nSee https://exoplayer.dev/issues/player-accessed-on-wrong-thread", objArr);
            if (!this.P) {
                if (this.Q) {
                    illegalStateException = null;
                } else {
                    illegalStateException = new IllegalStateException();
                }
                pw0.d(format, illegalStateException);
                this.Q = true;
                return;
            }
            throw new IllegalStateException(format);
        }
    }

    public final long E() {
        C();
        if (!o()) {
            gc0 k10 = k();
            if (k10.o()) {
                return -9223372036854775807L;
            }
            return q61.z(k10.e(c(), this.f10457a, 0L).f14272k);
        }
        dh2 dh2Var = this.T;
        km2 km2Var = dh2Var.f10438b;
        dh2Var.f10437a.n(km2Var.f12889a, this.f12756m);
        return q61.z(this.f12756m.b(km2Var.f12890b, km2Var.f12891c));
    }

    @Override
    public final int a() {
        C();
        if (o()) {
            return this.T.f10438b.f12890b;
        }
        return -1;
    }

    @Override
    public final int b() {
        C();
        if (o()) {
            return this.T.f10438b.f12891c;
        }
        return -1;
    }

    @Override
    public final int c() {
        C();
        int p10 = p();
        if (p10 == -1) {
            return 0;
        }
        return p10;
    }

    @Override
    public final int d() {
        C();
        if (this.T.f10437a.o()) {
            return 0;
        }
        dh2 dh2Var = this.T;
        return dh2Var.f10437a.a(dh2Var.f10438b.f12889a);
    }

    @Override
    public final int e() {
        C();
        return this.T.f10441e;
    }

    @Override
    public final int f() {
        C();
        return this.T.f10448m;
    }

    @Override
    public final void g() {
        C();
    }

    @Override
    public final long h() {
        C();
        if (o()) {
            dh2 dh2Var = this.T;
            dh2Var.f10437a.n(dh2Var.f10438b.f12889a, this.f12756m);
            dh2 dh2Var2 = this.T;
            if (dh2Var2.f10439c == -9223372036854775807L) {
                dh2Var2.f10437a.e(c(), this.f10457a, 0L).getClass();
                return q61.z(0L);
            }
            return q61.z(0L) + q61.z(this.T.f10439c);
        }
        return i();
    }

    @Override
    public final long i() {
        C();
        return q61.z(q(this.T));
    }

    @Override
    public final long j() {
        C();
        return q61.z(this.T.f10452q);
    }

    @Override
    public final gc0 k() {
        C();
        return this.T.f10437a;
    }

    @Override
    public final zi0 l() {
        C();
        return (zi0) this.T.f10445i.f11855d;
    }

    @Override
    public final boolean m() {
        C();
        return this.T.f10447l;
    }

    @Override
    public final void n() {
        C();
    }

    @Override
    public final boolean o() {
        C();
        return this.T.f10438b.a();
    }

    public final int p() {
        if (this.T.f10437a.o()) {
            return this.U;
        }
        dh2 dh2Var = this.T;
        return dh2Var.f10437a.n(dh2Var.f10438b.f12889a, this.f12756m).f11324c;
    }

    public final long q(dh2 dh2Var) {
        if (dh2Var.f10437a.o()) {
            return q61.x(this.V);
        }
        if (dh2Var.f10438b.a()) {
            return dh2Var.f10453r;
        }
        gc0 gc0Var = dh2Var.f10437a;
        km2 km2Var = dh2Var.f10438b;
        long j = dh2Var.f10453r;
        gc0Var.n(km2Var.f12889a, this.f12756m);
        return j;
    }

    public final Pair s(gc0 gc0Var, int i10, long j) {
        if (gc0Var.o()) {
            this.U = i10;
            if (j == -9223372036854775807L) {
                j = 0;
            }
            this.V = j;
            return null;
        }
        if (i10 == -1 || i10 >= gc0Var.c()) {
            i10 = gc0Var.g(false);
            gc0Var.e(i10, this.f10457a, 0L).getClass();
            j = q61.z(0L);
        }
        return gc0Var.l(this.f10457a, this.f12756m, i10, q61.x(j));
    }

    public final dh2 u(dh2 dh2Var, gc0 gc0Var, Pair pair) {
        boolean z10;
        km2 km2Var;
        un2 un2Var;
        gp2 gp2Var;
        List list;
        dh2 b10;
        long j;
        if (!gc0Var.o() && pair == null) {
            z10 = false;
        } else {
            z10 = true;
        }
        fx1.B(z10);
        gc0 gc0Var2 = dh2Var.f10437a;
        dh2 f10 = dh2Var.f(gc0Var);
        if (gc0Var.o()) {
            km2 km2Var2 = dh2.f10436s;
            long x10 = q61.x(this.V);
            dh2 a10 = f10.b(km2Var2, x10, x10, x10, 0L, un2.f17099d, this.f12746b, yu1.f18522w).a(km2Var2);
            a10.f10451p = a10.f10453r;
            return a10;
        }
        Object obj = f10.f10438b.f12889a;
        int i10 = q61.f15497a;
        boolean z11 = !obj.equals(pair.first);
        if (z11) {
            km2Var = new km2(pair.first);
        } else {
            km2Var = f10.f10438b;
        }
        km2 km2Var3 = km2Var;
        long longValue = ((Long) pair.second).longValue();
        long x11 = q61.x(h());
        if (!gc0Var2.o()) {
            gc0Var2.n(obj, this.f12756m);
        }
        if (!z11 && longValue >= x11) {
            if (longValue == x11) {
                int a11 = gc0Var.a(f10.f10446k.f12889a);
                if (a11 == -1 || gc0Var.d(a11, this.f12756m, false).f11324c != gc0Var.n(km2Var3.f12889a, this.f12756m).f11324c) {
                    gc0Var.n(km2Var3.f12889a, this.f12756m);
                    if (km2Var3.a()) {
                        j = this.f12756m.b(km2Var3.f12890b, km2Var3.f12891c);
                    } else {
                        j = this.f12756m.f11325d;
                    }
                    b10 = f10.b(km2Var3, f10.f10453r, f10.f10453r, f10.f10440d, j - f10.f10453r, f10.f10444h, f10.f10445i, f10.j).a(km2Var3);
                    b10.f10451p = j;
                } else {
                    return f10;
                }
            } else {
                fx1.H(!km2Var3.a());
                long max = Math.max(0L, f10.f10452q - (longValue - x11));
                long j10 = f10.f10451p;
                if (f10.f10446k.equals(f10.f10438b)) {
                    j10 = longValue + max;
                }
                b10 = f10.b(km2Var3, longValue, longValue, longValue, max, f10.f10444h, f10.f10445i, f10.j);
                b10.f10451p = j10;
            }
            return b10;
        }
        fx1.H(!km2Var3.a());
        if (z11) {
            un2Var = un2.f17099d;
        } else {
            un2Var = f10.f10444h;
        }
        un2 un2Var2 = un2Var;
        if (z11) {
            gp2Var = this.f12746b;
        } else {
            gp2Var = f10.f10445i;
        }
        gp2 gp2Var2 = gp2Var;
        if (z11) {
            yt1 yt1Var = au1.f9385t;
            list = yu1.f18522w;
        } else {
            list = f10.j;
        }
        dh2 a12 = f10.b(km2Var3, longValue, longValue, longValue, 0L, un2Var2, gp2Var2, list).a(km2Var3);
        a12.f10451p = longValue;
        return a12;
    }

    public final gh2 v(s52 s52Var) {
        p();
        qg2 qg2Var = this.j;
        gc0 gc0Var = this.T.f10437a;
        return new gh2(qg2Var, s52Var, this.f12762s, qg2Var.B);
    }

    public final void w(final int i10, final int i11) {
        if (i10 == this.J && i11 == this.K) {
            return;
        }
        this.J = i10;
        this.K = i11;
        uu0 uu0Var = this.f12754k;
        uu0Var.b(24, new xs0() {
            @Override
            public final void mo8d(Object obj) {
                int i12 = i10;
                int i13 = i11;
                int i14 = jg2.Y;
                ((g50) obj).s(i12, i13);
            }
        });
        uu0Var.a();
    }

    public final void x(int i10, int i11, Object obj) {
        s52[] s52VarArr = this.f12751g;
        int length = s52VarArr.length;
        for (int i12 = 0; i12 < 2; i12++) {
            s52 s52Var = s52VarArr[i12];
            if (s52Var.f16221s == i10) {
                gh2 v = v(s52Var);
                fx1.H(!v.f11786f);
                v.f11783c = i11;
                fx1.H(!v.f11786f);
                v.f11784d = obj;
                v.b();
            }
        }
    }

    public final void y(Object obj) {
        ArrayList arrayList = new ArrayList();
        s52[] s52VarArr = this.f12751g;
        int length = s52VarArr.length;
        boolean z10 = false;
        for (int i10 = 0; i10 < 2; i10++) {
            s52 s52Var = s52VarArr[i10];
            if (s52Var.f16221s == 2) {
                gh2 v = v(s52Var);
                fx1.H(!v.f11786f);
                v.f11783c = 1;
                fx1.H(true ^ v.f11786f);
                v.f11784d = obj;
                v.b();
                arrayList.add(v);
            }
        }
        Object obj2 = this.G;
        if (obj2 != null && obj2 != obj) {
            try {
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    ((gh2) it.next()).d(this.f12766x);
                }
            } catch (InterruptedException unused) {
                Thread.currentThread().interrupt();
            } catch (TimeoutException unused2) {
                z10 = true;
            }
            Object obj3 = this.G;
            Surface surface = this.H;
            if (obj3 == surface) {
                surface.release();
                this.H = null;
            }
        }
        this.G = obj;
        if (z10) {
            z(new zb2(2, new rg2(3), 1003));
        }
    }

    public final void z(zb2 zb2Var) {
        boolean z10;
        dh2 dh2Var = this.T;
        dh2 a10 = dh2Var.a(dh2Var.f10438b);
        a10.f10451p = a10.f10453r;
        a10.f10452q = 0L;
        dh2 e10 = a10.e(1);
        if (zb2Var != null) {
            e10 = e10.d(zb2Var);
        }
        dh2 dh2Var2 = e10;
        this.f12767y++;
        y31 y31Var = (y31) this.j.f15617z;
        y31Var.getClass();
        h31 c10 = y31.c();
        c10.f11961a = y31Var.f18326a.obtainMessage(6);
        c10.a();
        if (dh2Var2.f10437a.o() && !this.T.f10437a.o()) {
            z10 = true;
        } else {
            z10 = false;
        }
        B(dh2Var2, 0, 1, false, z10, 4, q(dh2Var2), -1);
    }
}