package androidx.room;

import android.content.Context;
import com.google.android.gms.measurement.internal.u1;
import java.io.File;
import java.util.concurrent.Callable;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class g0 implements sd.a {

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

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

    public /* synthetic */ g0(Object obj, int i10) {
        this.f4088a = i10;
        this.f4089b = obj;
    }

    @Override // sd.a
    public final Object invoke() {
        androidx.sqlite.db.framework.a aVar;
        int i10 = this.f4088a;
        Object obj = null;
        Object obj2 = this.f4089b;
        switch (i10) {
            case 0:
                return ((Callable) obj2).call();
            case 1:
                ((Runnable) obj2).run();
                return kd.e.f29109a;
            case 2:
                t0 t0Var = (t0) obj2;
                return t0Var.f4154a.compileStatement(t0Var.b());
            case 3:
                u1.x(obj2);
                throw null;
            default:
                m3.e eVar = (m3.e) obj2;
                int i11 = 7;
                if (eVar.f30355b == null || !eVar.f30357d) {
                    aVar = new androidx.sqlite.db.framework.a(eVar.f30354a, eVar.f30355b, new xyz.stream.utils.f0(obj, i11), eVar.f30356c, eVar.f30358e);
                } else {
                    Context context = eVar.f30354a;
                    nb.g.i(context, "context");
                    File noBackupFilesDir = context.getNoBackupFilesDir();
                    nb.g.h(noBackupFilesDir, "getNoBackupFilesDir(...)");
                    aVar = new androidx.sqlite.db.framework.a(eVar.f30354a, new File(noBackupFilesDir, eVar.f30355b).getAbsolutePath(), new xyz.stream.utils.f0(obj, i11), eVar.f30356c, eVar.f30358e);
                }
                aVar.setWriteAheadLoggingEnabled(eVar.f30360g);
                return aVar;
        }
    }
}
