package xyz.netfly.ui.live.epg;

import android.app.Activity;
import java.util.List;
import xyz.netfly.ui.live.tablet.LivePlayActivity;
import xyz.netfly.ui.live.tv.LiveActivity;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class i implements Runnable {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f35349a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f35350b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ int f35351c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ int f35352d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ Object f35353e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ Object f35354f;

    public /* synthetic */ i(int i10, int i11, Activity activity, List list, pf.e eVar) {
        this.f35349a = 3;
        this.f35351c = i10;
        this.f35352d = i11;
        this.f35353e = list;
        this.f35350b = activity;
        this.f35354f = eVar;
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f35349a) {
            case 0:
                q qVar = (q) this.f35353e;
                int i10 = this.f35351c;
                String str = (String) this.f35350b;
                xyz.stream.api.e eVar = (xyz.stream.api.e) this.f35354f;
                int i11 = this.f35352d;
                qVar.getClass();
                try {
                } catch (Exception e10) {
                    u.a.g(e10, new StringBuilder("runEpgListCacheFirst error: "));
                }
                if (qVar.u(i11) && !Thread.currentThread().isInterrupted()) {
                    l lVarK = qVar.k(i10, str);
                    if (qVar.u(i11) && !Thread.currentThread().isInterrupted()) {
                        if (lVarK.f35366b) {
                            eVar.onSuccess(lVarK.f35365a);
                            return;
                        }
                        if (!qVar.u(i11) || Thread.currentThread().isInterrupted()) {
                            return;
                        }
                        synchronized (qVar.f35383g) {
                            try {
                                if (i11 == qVar.f35387k) {
                                    qVar.f35384h.add(new m(i10, str, eVar, i11));
                                    qVar.y();
                                }
                            } finally {
                            }
                        }
                        return;
                    }
                    return;
                }
                return;
            case 1:
                LivePlayActivity livePlayActivity = (LivePlayActivity) this.f35353e;
                String str2 = (String) this.f35350b;
                String str3 = (String) this.f35354f;
                int i12 = LivePlayActivity.f35447f0;
                livePlayActivity.L(this.f35351c, this.f35352d, str2, str3);
                return;
            case 2:
                final LiveActivity liveActivity = (LiveActivity) this.f35353e;
                final int i13 = this.f35351c;
                final String str4 = (String) this.f35350b;
                final String str5 = (String) this.f35354f;
                final int i14 = this.f35352d;
                int i15 = LiveActivity.f35467o0;
                liveActivity.getClass();
                xyz.stream.api.q.g().getClass();
                final String strH = xyz.stream.api.q.h(i13);
                liveActivity.runOnUiThread(new Runnable() { // from class: ve.e
                    @Override // java.lang.Runnable
                    public final void run() {
                        LiveActivity liveActivity2 = liveActivity;
                        String str6 = strH;
                        String str7 = str4;
                        int i16 = i13;
                        String str8 = str5;
                        int i17 = i14;
                        int i18 = LiveActivity.f35467o0;
                        liveActivity2.M(i16, i17, str6, str7, str8);
                    }
                });
                return;
            default:
                List list = (List) this.f35353e;
                Activity activity = (Activity) this.f35350b;
                pf.e eVar2 = (pf.e) this.f35354f;
                List listM = xyz.stream.api.o.f().m(this.f35351c, null, Integer.valueOf(this.f35352d));
                if (listM != null && !listM.isEmpty()) {
                    list.addAll(listM);
                }
                activity.runOnUiThread(new p000if.e(eVar2, 12));
                return;
        }
    }

    public /* synthetic */ i(Object obj, int i10, String str, Object obj2, int i11, int i12) {
        this.f35349a = i12;
        this.f35353e = obj;
        this.f35351c = i10;
        this.f35350b = str;
        this.f35354f = obj2;
        this.f35352d = i11;
    }

    public /* synthetic */ i(LivePlayActivity livePlayActivity, String str, String str2, int i10, int i11) {
        this.f35349a = 1;
        this.f35353e = livePlayActivity;
        this.f35350b = str;
        this.f35354f = str2;
        this.f35351c = i10;
        this.f35352d = i11;
    }
}
