package a4;

import androidx.room.RoomDatabase;
import androidx.room.w0;
import com.google.android.gms.internal.atv_ads_framework.d1;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.chromium.support_lib_boundary.JsReplyProxyBoundaryInterface;
import org.chromium.support_lib_boundary.WebViewRendererBoundaryInterface;
import xyz.stream.api.viewmodel.RecommendViewModel;

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

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

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

    public /* synthetic */ s(Object obj, int i10) {
        this.f358a = i10;
        this.f359b = obj;
    }

    @Override // java.util.concurrent.Callable
    public final Object call() throws IOException {
        int i10 = this.f358a;
        Object obj = this.f359b;
        switch (i10) {
            case 0:
                return new t((JsReplyProxyBoundaryInterface) obj);
            case 1:
                s0 s0Var = new s0();
                s0Var.f361a = (WebViewRendererBoundaryInterface) obj;
                return s0Var;
            case 2:
                OkHttpClient okHttpClient = ve.v.E;
                Response responseExecute = ve.v.E.newCall(new Request.Builder().url((String) obj).get().build()).execute();
                try {
                    Boolean boolValueOf = Boolean.valueOf(!responseExecute.isSuccessful());
                    responseExecute.close();
                    return boolValueOf;
                } catch (Throwable th) {
                    if (responseExecute != null) {
                        try {
                            responseExecute.close();
                        } catch (Throwable th2) {
                            th.addSuppressed(th2);
                        }
                        break;
                    }
                    throw th;
                }
            case 3:
                vf.i iVar = (vf.i) ((xyz.stream.api.database.f) obj).f35808a.serverDao();
                iVar.getClass();
                return (List) androidx.room.util.b.b(iVar.f33973a, true, false, new w0(8));
            case 4:
                ExecutorService executorService = xyz.stream.api.database.n.f35835a;
                return (Integer) androidx.room.util.b.b((RoomDatabase) ((d1) ((vf.t) obj)).f19914b, true, false, new h3.b(xyz.stream.utils.f0.o().q("flutter.selectRoles", ""), 4));
            default:
                return ((RecommendViewModel) obj).getLiveRecordSync();
        }
    }
}
