package io.flutter.embedding.engine.loader;

import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;

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

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

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

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ String[] f27983d;

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

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

    public /* synthetic */ c(f fVar, Context context, String[] strArr, Handler handler, Runnable runnable, int i10) {
        this.f27980a = i10;
        this.f27981b = fVar;
        this.f27982c = context;
        this.f27983d = strArr;
        this.f27984e = handler;
        this.f27985f = runnable;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i10 = this.f27980a;
        f fVar = this.f27981b;
        switch (i10) {
            case 0:
                Context context = this.f27982c;
                String[] strArr = this.f27983d;
                Handler handler = this.f27984e;
                Runnable runnable = this.f27985f;
                fVar.getClass();
                try {
                    fVar.initResultFuture.get();
                    Looper mainLooper = Looper.getMainLooper();
                    (Build.VERSION.SDK_INT >= 28 ? Handler.createAsync(mainLooper) : new Handler(mainLooper)).post(new c(fVar, context, strArr, handler, runnable, 1));
                    return;
                } catch (Exception e10) {
                    throw new RuntimeException(e10);
                }
            default:
                fVar.getClass();
                fVar.ensureInitializationComplete(this.f27982c.getApplicationContext(), this.f27983d);
                this.f27984e.post(this.f27985f);
                return;
        }
    }
}
