package androidx.core.view;

import android.animation.ValueAnimator;
import android.content.Context;
import android.view.View;
import androidx.work.WorkInfo$State;
import com.getkeepsafe.relinker.MissingLibraryException;
import com.google.android.gms.ads.AdFormat;
import com.google.android.gms.internal.ads.az;
import java.util.UUID;

/* JADX INFO: loaded from: classes.dex */
public final class f2 implements Runnable {

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

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

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

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

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

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

    public /* synthetic */ f2(Context context, AdFormat adFormat, g7.f fVar, String str, w7.b bVar) {
        this.f1740a = 3;
        this.f1741b = context;
        this.f1742c = adFormat;
        this.f1743d = fVar;
        this.f1744e = str;
        this.f1745f = bVar;
    }

    @Override // java.lang.Runnable
    public final void run() throws Throwable {
        int i10 = this.f1740a;
        Object obj = this.f1745f;
        Object obj2 = this.f1741b;
        Object obj3 = this.f1742c;
        Object obj4 = this.f1744e;
        Object obj5 = this.f1743d;
        switch (i10) {
            case 0:
                h2.h((View) obj2, (l2) obj3, (fe.h) obj5);
                ((ValueAnimator) obj4).start();
                return;
            case 1:
                try {
                    if (!((androidx.work.impl.utils.futures.i) obj2).isCancelled()) {
                        String string = ((UUID) obj3).toString();
                        WorkInfo$State workInfo$StateL = ((n4.r) ((o4.p) obj).f31412c).l(string);
                        if (workInfo$StateL == null || workInfo$StateL.a()) {
                            throw new IllegalStateException("Calls to setForegroundAsync() must complete before a ListenableWorker signals completion of work by returning an instance of Result.");
                        }
                        ((androidx.work.impl.d) ((o4.p) obj).f31411b).d(string, (androidx.work.j) obj5);
                        ((Context) obj4).startService(androidx.work.impl.foreground.c.a((Context) obj4, string, (androidx.work.j) obj5));
                    }
                    ((androidx.work.impl.utils.futures.i) obj2).set(null);
                    return;
                } catch (Throwable th) {
                    ((androidx.work.impl.utils.futures.i) obj2).i(th);
                    return;
                }
            case 2:
                try {
                    ((s6.b) obj).c((Context) obj2, (String) obj3, (String) obj5);
                    com.google.android.gms.measurement.internal.u1.x(obj4);
                    throw null;
                } catch (MissingLibraryException unused) {
                    com.google.android.gms.measurement.internal.u1.x(obj4);
                    throw null;
                } catch (UnsatisfiedLinkError unused2) {
                    com.google.android.gms.measurement.internal.u1.x(obj4);
                    throw null;
                }
            default:
                g7.f fVar = (g7.f) obj5;
                new az((Context) obj2, (AdFormat) obj3, fVar != null ? fVar.f26279a : null, (String) obj4).a((w7.b) obj);
                return;
        }
    }

    public /* synthetic */ f2(Object obj, Object obj2, Object obj3, Object obj4, Object obj5, int i10) {
        this.f1740a = i10;
        this.f1745f = obj;
        this.f1741b = obj2;
        this.f1742c = obj3;
        this.f1743d = obj4;
        this.f1744e = obj5;
    }
}
