package com.google.android.gms.internal.ads;

import android.content.Context;
import java.util.Objects;
import java.util.concurrent.Future;

/* JADX INFO: loaded from: classes2.dex */
public final class lh implements Runnable {

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

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

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

    public /* synthetic */ lh(int i10, int i11, Object obj) {
        this.f13689a = i11;
        this.f13691c = obj;
        this.f13690b = i10;
    }

    @Override // java.lang.Runnable
    public final void run() {
        pf pfVarG = null;
        switch (this.f13689a) {
            case 0:
                int i10 = this.f13690b;
                mh mhVar = (mh) this.f13691c;
                if (i10 > 0) {
                    try {
                        Thread.sleep(i10 * 1000);
                        break;
                    } catch (InterruptedException unused) {
                    }
                }
                try {
                    Context context = mhVar.f14219a;
                    pfVarG = ih1.g(context, context.getPackageName(), Integer.toString(context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode));
                    break;
                } catch (Throwable unused2) {
                }
                mh mhVar2 = (mh) this.f13691c;
                mhVar2.f14226h = pfVarG;
                int i11 = this.f13690b;
                if (i11 < 4) {
                    if (pfVarG == null || !pfVarG.b0() || pfVarG.w0().equals("0000000000000000000000000000000000000000000000000000000000000000") || !pfVarG.A0() || !pfVarG.B0().B() || pfVarG.B0().C() == -2) {
                        int i12 = i11 + 1;
                        if (mhVar2.f14230l) {
                            Future<?> futureSubmit = mhVar2.f14220b.submit(new lh(mhVar2, i12));
                            if (i12 == 0) {
                                mhVar2.f14227i = futureSubmit;
                            }
                            break;
                        }
                    }
                }
                break;
            case 1:
                ((so) this.f13691c).d(this.f13690b);
                break;
            case 2:
                ((x30) this.f13691c).f18314b.onAudioFocusChange(this.f13690b);
                break;
            case 3:
                q30 q30Var = ((zzcfi) this.f13691c).S;
                if (q30Var != null) {
                    q30Var.onWindowVisibilityChanged(this.f13690b);
                }
                break;
            case 4:
                q30 q30Var2 = ((zzcgw) this.f13691c).f19602f;
                if (q30Var2 != null) {
                    q30Var2.onWindowVisibilityChanged(this.f13690b);
                }
                break;
            case 5:
                ((qn1) this.f13691c).b(this.f13690b + 1);
                break;
            case 6:
                ek2 ek2Var = (ek2) ((ci2) this.f13691c).Y;
                ek2Var.r(ek2Var.s(), 1034, new en1(29, (Object) null));
                break;
            default:
                ((gl2) this.f13691c).a(this.f13690b);
                break;
        }
    }

    public lh(mh mhVar, int i10) {
        this.f13689a = 0;
        this.f13690b = i10;
        Objects.requireNonNull(mhVar);
        this.f13691c = mhVar;
    }
}
