package o;

import android.content.Context;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Q8 {
    public static JSONObject a = null;
    public static String b = "";
    public static String c = "";
    public static final C1014dc0 d = new C1014dc0(new K0(9));

    public static void a(Context context, String str, String str2) throws JSONException, IOException {
        b = str;
        c = str2;
        try {
            InputStream inputStreamOpen = context.getAssets().open("port.json");
            byte[] bArr = new byte[inputStreamOpen.available()];
            inputStreamOpen.read(bArr);
            inputStreamOpen.close();
            JSONObject jSONObject = new JSONObject(new String(bArr, AbstractC2355rh.a));
            String strA = AbstractC1480iS.a(context);
            if (strA == null) {
                strA = "";
            }
            JSONObject jSONObject2 = new JSONObject();
            jSONObject2.put("port", jSONObject.getString("port"));
            jSONObject2.put("receive_url", strA);
            a = jSONObject2;
        } catch (Exception unused) {
        }
    }

    public static Object b(String str, String str2, Sb0 sb0) {
        C2468sq c2468sq = AbstractC1903ms.a;
        return AbstractC1692kh0.T(ExecutorC1232fq.m, new P8(str2, str, null, 0), sb0);
    }

    public static Object c(File file, String str, Sb0 sb0) {
        C2468sq c2468sq = AbstractC1903ms.a;
        Object objT = AbstractC1692kh0.T(ExecutorC1232fq.m, new P8(str, file, null, 1), sb0);
        return objT == EnumC0091Dn.l ? objT : Oh0.a;
    }
}
