package I2;

import android.os.Bundle;
import android.os.DeadObjectException;
import android.text.TextUtils;
import com.android.billingclient.api.Purchase;
import com.google.android.gms.internal.play_billing.zza;
import com.google.android.gms.internal.play_billing.zzam;
import com.google.android.gms.internal.play_billing.zzbt;
import com.google.android.gms.internal.play_billing.zzc;
import com.google.android.gms.internal.play_billing.zzie;
import com.revenuecat.purchases.google.history.BillingConstants;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Objects;
import java.util.concurrent.Callable;
import org.json.JSONException;
import org.json.JSONObject;

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

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

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

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

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

    public /* synthetic */ E(C0320d c0320d, Object obj, Object obj2, int i6) {
        this.f2496a = i6;
        this.f2497b = c0320d;
        this.f2498c = obj;
        this.f2499d = obj2;
    }

    /* JADX WARN: Code restructure failed: missing block: B:23:0x008f, code lost:
    
        r0 = r2.G(I2.V.f2551j, com.google.android.gms.internal.play_billing.zzie.SERVICE_RESET_TO_NULL, "Service has been reset to null", r3);
     */
    /* JADX WARN: Code restructure failed: missing block: B:24:0x0099, code lost:
    
        r17 = r3;
     */
    /* JADX WARN: Removed duplicated region for block: B:102:0x0245  */
    /* JADX WARN: Removed duplicated region for block: B:103:0x0251  */
    /* JADX WARN: Removed duplicated region for block: B:116:0x016e A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:69:0x0176  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    private final Object a() throws Throwable {
        Exception exc;
        T.p pVarG;
        ArrayList arrayList;
        zzam zzamVar;
        Bundle bundle;
        Bundle bundleZzi;
        C0328l c0328lD;
        zzie zzieVar;
        C0320d c0320d = this.f2497b;
        Exception exc2 = null;
        int i6 = 9;
        if (!c0320d.v()) {
            zzie zzieVar2 = zzie.SERVICE_CONNECTION_NOT_READY;
            C0328l c0328l = V.f2551j;
            c0320d.I(9, c0328l, zzieVar2);
            ((InterfaceC0338w) this.f2498c).b(c0328l, zzbt.zzk());
            return null;
        }
        String str = (String) this.f2499d;
        if (TextUtils.isEmpty(str)) {
            zzc.zzn("BillingClient", "Please provide a valid product type.");
            zzie zzieVar3 = zzie.EMPTY_PRODUCT_TYPE;
            C0328l c0328l2 = V.f2546e;
            c0320d.I(9, c0328l2, zzieVar3);
            ((InterfaceC0338w) this.f2498c).b(c0328l2, zzbt.zzk());
            return null;
        }
        zzc.zzm("BillingClient", "Querying owned items, item type: ".concat(str));
        ArrayList arrayList2 = new ArrayList();
        boolean z6 = c0320d.f2605p;
        boolean z7 = c0320d.f2612w;
        c0320d.f2586C.getClass();
        boolean z8 = c0320d.f2586C.f2641a;
        long jLongValue = c0320d.f2589F.longValue();
        Bundle bundle2 = new Bundle();
        zzc.zzc(bundle2, c0320d.f2593c, c0320d.f2594d, jLongValue);
        if (z6) {
            bundle2.putBoolean("enablePendingPurchases", true);
        }
        if (z7 && z8) {
            bundle2.putBoolean("enablePendingPurchaseForSubscriptions", true);
        }
        String string = null;
        while (true) {
            try {
                synchronized (c0320d.f2591a) {
                    try {
                        zzamVar = c0320d.f2599i;
                    } catch (Throwable th) {
                        th = th;
                        exc = exc2;
                        while (true) {
                            try {
                                try {
                                    throw th;
                                } catch (DeadObjectException e6) {
                                    e = e6;
                                    pVarG = c0320d.G(V.f2551j, zzie.GET_PURCHASE_SERVICE_CALL_EXCEPTION, "Got exception trying to get purchases try to reconnect", e);
                                    arrayList = (ArrayList) pVarG.f6345b;
                                    if (arrayList != null) {
                                    }
                                    return exc;
                                } catch (Exception e7) {
                                    e = e7;
                                    pVarG = c0320d.G(V.f2549h, zzie.GET_PURCHASE_SERVICE_CALL_EXCEPTION, "Got exception trying to get purchases try to reconnect", e);
                                    arrayList = (ArrayList) pVarG.f6345b;
                                    if (arrayList != null) {
                                    }
                                    return exc;
                                }
                            } catch (Throwable th2) {
                                th = th2;
                            }
                        }
                    }
                }
                if (zzamVar == null) {
                    break;
                }
                if (c0320d.f2605p) {
                    bundle = bundle2;
                    bundleZzi = zzamVar.zzi(c0320d.f2585B ? 26 : c0320d.f2584A ? 24 : c0320d.f2612w ? 19 : i6, c0320d.f2597g.getPackageName(), str, string, bundle);
                } else {
                    bundleZzi = zzamVar.zzh(3, c0320d.f2597g.getPackageName(), str, string);
                    bundle = bundle2;
                }
                C0328l c0328l3 = V.f2549h;
                if (bundleZzi == null) {
                    zzc.zzn("BillingClient", "getPurchase() got null owned items list");
                    zzieVar = zzie.NULL_OWNED_ITEMS_LIST;
                } else {
                    int iZzb = zzc.zzb(bundleZzi, "BillingClient");
                    String strZzj = zzc.zzj(bundleZzi, "BillingClient");
                    C0327k c0327kA = C0328l.a();
                    c0327kA.f2633a = iZzb;
                    c0327kA.f2635c = strZzj;
                    c0328lD = c0327kA.d();
                    if (iZzb != 0) {
                        zzc.zzn("BillingClient", "getPurchase() failed. Response code: " + iZzb);
                        zzieVar = zzie.BILLING_RESULT_RECEIVED_FROM_PHONESKY;
                    } else if (bundleZzi.containsKey("INAPP_PURCHASE_ITEM_LIST") && bundleZzi.containsKey(BillingConstants.INAPP_PURCHASE_DATA_LIST) && bundleZzi.containsKey(BillingConstants.INAPP_DATA_SIGNATURE_LIST)) {
                        ArrayList<String> stringArrayList = bundleZzi.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
                        ArrayList<String> stringArrayList2 = bundleZzi.getStringArrayList(BillingConstants.INAPP_PURCHASE_DATA_LIST);
                        ArrayList<String> stringArrayList3 = bundleZzi.getStringArrayList(BillingConstants.INAPP_DATA_SIGNATURE_LIST);
                        if (stringArrayList == null) {
                            zzc.zzn("BillingClient", "Bundle returned from getPurchase() contains null SKUs list.");
                            zzieVar = zzie.NULL_SKUS_LIST;
                        } else if (stringArrayList2 == null) {
                            zzc.zzn("BillingClient", "Bundle returned from getPurchase() contains null purchases list.");
                            zzieVar = zzie.NULL_PURCHASES_LIST;
                        } else if (stringArrayList3 == null) {
                            zzc.zzn("BillingClient", "Bundle returned from getPurchase() contains null signatures list.");
                            zzieVar = zzie.NULL_SIGNATURES_LIST;
                        } else {
                            c0328lD = V.f2550i;
                            zzieVar = zzie.REASON_UNSPECIFIED;
                        }
                    } else {
                        zzc.zzn("BillingClient", "Bundle returned from getPurchase() doesn't contain required fields.");
                        zzieVar = zzie.MISSING_REQUIRED_PURCHASE_KEY;
                    }
                    if (c0328lD == V.f2550i) {
                        pVarG = c0320d.G(c0328lD, zzieVar, "Purchase bundle invalid", exc2);
                        break;
                    }
                    ArrayList<String> stringArrayList4 = bundleZzi.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
                    ArrayList<String> stringArrayList5 = bundleZzi.getStringArrayList(BillingConstants.INAPP_PURCHASE_DATA_LIST);
                    ArrayList<String> stringArrayList6 = bundleZzi.getStringArrayList(BillingConstants.INAPP_DATA_SIGNATURE_LIST);
                    int i7 = 0;
                    boolean z9 = false;
                    while (i7 < stringArrayList5.size()) {
                        String str2 = stringArrayList5.get(i7);
                        exc = exc2;
                        String str3 = stringArrayList6.get(i7);
                        ArrayList<String> arrayList3 = stringArrayList4;
                        zzc.zzm("BillingClient", "Sku is owned: ".concat(String.valueOf(stringArrayList4.get(i7))));
                        try {
                            Purchase purchase = new Purchase(str2, str3);
                            if (TextUtils.isEmpty(purchase.b())) {
                                zzc.zzn("BillingClient", "BUG: empty/null token!");
                                z9 = true;
                            }
                            arrayList2.add(purchase);
                            i7++;
                            exc2 = exc;
                            stringArrayList4 = arrayList3;
                        } catch (JSONException e8) {
                            pVarG = c0320d.G(V.f2549h, zzie.ERROR_DECODING_PURCHASE_DATA, "Got an exception trying to decode the purchase!", e8);
                        }
                    }
                    exc = exc2;
                    if (z9) {
                        i6 = 9;
                        c0320d.I(9, c0328l3, zzie.EMPTY_PURCHASE_TOKEN);
                    } else {
                        i6 = 9;
                    }
                    string = bundleZzi.getString(BillingConstants.INAPP_CONTINUATION_TOKEN);
                    zzc.zzm("BillingClient", "Continuation token: ".concat(String.valueOf(string)));
                    if (TextUtils.isEmpty(string)) {
                        pVarG = new T.p(V.f2550i, arrayList2);
                        break;
                    }
                    bundle2 = bundle;
                    exc2 = exc;
                }
                c0328lD = c0328l3;
                if (c0328lD == V.f2550i) {
                }
            } catch (DeadObjectException e9) {
                e = e9;
                exc = exc2;
            } catch (Exception e10) {
                e = e10;
                exc = exc2;
            }
        }
        arrayList = (ArrayList) pVarG.f6345b;
        if (arrayList != null) {
            ((InterfaceC0338w) this.f2498c).b((C0328l) pVarG.f6346c, arrayList);
        } else {
            ((InterfaceC0338w) this.f2498c).b((C0328l) pVarG.f6346c, zzbt.zzk());
        }
        return exc;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // java.util.concurrent.Callable
    public final Object call() {
        zzam zzamVar;
        zzam zzamVar2;
        int iZza;
        String strZzj;
        O o6;
        zzam zzamVar3;
        zzam zzamVar4;
        int i6 = 0;
        int i7 = 1;
        Exception exc = null;
        switch (this.f2496a) {
            case 0:
                C0320d c0320d = this.f2497b;
                com.revenuecat.purchases.google.usecase.a aVar = (com.revenuecat.purchases.google.usecase.a) this.f2498c;
                C0317a c0317a = (C0317a) this.f2499d;
                c0320d.getClass();
                try {
                    if (!c0320d.v()) {
                        zzie zzieVar = zzie.SERVICE_CONNECTION_NOT_READY;
                        C0328l c0328l = V.f2551j;
                        c0320d.I(3, c0328l, zzieVar);
                        aVar.c(c0328l);
                    } else if (TextUtils.isEmpty(c0317a.f2580b)) {
                        zzc.zzn("BillingClient", "Please provide a valid purchase token.");
                        zzie zzieVar2 = zzie.EMPTY_PURCHASE_TOKEN;
                        C0328l c0328l2 = V.f2548g;
                        c0320d.I(3, c0328l2, zzieVar2);
                        aVar.c(c0328l2);
                    } else if (c0320d.f2605p) {
                        synchronized (c0320d.f2591a) {
                            zzamVar = c0320d.f2599i;
                            break;
                        }
                        if (zzamVar == null) {
                            c0320d.k(aVar, V.f2551j, zzie.SERVICE_RESET_TO_NULL, null);
                        } else {
                            String packageName = c0320d.f2597g.getPackageName();
                            String str = c0317a.f2580b;
                            String str2 = c0320d.f2593c;
                            String str3 = c0320d.f2594d;
                            long jLongValue = c0320d.f2589F.longValue();
                            int i8 = zzc.zza;
                            Bundle bundle = new Bundle();
                            zzc.zzc(bundle, str2, str3, jLongValue);
                            Bundle bundleZzd = zzamVar.zzd(9, packageName, str, bundle);
                            aVar.c(V.a(zzc.zzb(bundleZzd, "BillingClient"), zzc.zzj(bundleZzd, "BillingClient")));
                        }
                    } else {
                        zzie zzieVar3 = zzie.API_VERSION_NOT_V9;
                        C0328l c0328l3 = V.f2542a;
                        c0320d.I(3, c0328l3, zzieVar3);
                        aVar.c(c0328l3);
                    }
                } catch (DeadObjectException e6) {
                    c0320d.k(aVar, V.f2551j, zzie.ACKNOWLEDGE_PURCHASE_SERVICE_CALL_EXCEPTION, e6);
                } catch (Exception e7) {
                    c0320d.k(aVar, V.f2549h, zzie.ACKNOWLEDGE_PURCHASE_SERVICE_CALL_EXCEPTION, e7);
                }
                return null;
            case 1:
                C0320d c0320d2 = this.f2497b;
                com.revenuecat.purchases.google.usecase.a aVar2 = (com.revenuecat.purchases.google.usecase.a) this.f2498c;
                C0317a c0317a2 = (C0317a) this.f2499d;
                if (!c0320d2.v()) {
                    zzie zzieVar4 = zzie.SERVICE_CONNECTION_NOT_READY;
                    C0328l c0328l4 = V.f2551j;
                    c0320d2.I(4, c0328l4, zzieVar4);
                    aVar2.d(c0328l4, c0317a2.f2580b);
                    return null;
                }
                String str4 = c0317a2.f2580b;
                try {
                    zzc.zzm("BillingClient", "Consuming purchase with token: ".concat(str4));
                    synchronized (c0320d2.f2591a) {
                        zzamVar2 = c0320d2.f2599i;
                        break;
                    }
                    if (zzamVar2 == null) {
                        c0320d2.l(aVar2, str4, V.f2551j, zzie.SERVICE_RESET_TO_NULL, "Service has been reset to null.", null);
                        return null;
                    }
                    if (c0320d2.f2605p) {
                        String packageName2 = c0320d2.f2597g.getPackageName();
                        boolean z6 = c0320d2.f2605p;
                        String str5 = c0320d2.f2593c;
                        String str6 = c0320d2.f2594d;
                        long jLongValue2 = c0320d2.f2589F.longValue();
                        Bundle bundle2 = new Bundle();
                        if (z6) {
                            zzc.zzc(bundle2, str5, str6, jLongValue2);
                        }
                        Bundle bundleZze = zzamVar2.zze(9, packageName2, str4, bundle2);
                        iZza = bundleZze.getInt(BillingConstants.RESPONSE_CODE);
                        strZzj = zzc.zzj(bundleZze, "BillingClient");
                    } else {
                        iZza = zzamVar2.zza(3, c0320d2.f2597g.getPackageName(), str4);
                        strZzj = "";
                    }
                    C0328l c0328lA = V.a(iZza, strZzj);
                    if (iZza == 0) {
                        zzc.zzm("BillingClient", "Successfully consumed purchase.");
                        aVar2.d(c0328lA, str4);
                        return null;
                    }
                    c0320d2.l(aVar2, str4, c0328lA, zzie.BILLING_RESULT_RECEIVED_FROM_PHONESKY, "Error consuming purchase with token. Response code: " + iZza, null);
                    return null;
                } catch (DeadObjectException e8) {
                    c0320d2.l(aVar2, str4, V.f2551j, zzie.CONSUME_PURCHASE_SERVICE_CALL_EXCEPTION, "Error consuming purchase!", e8);
                    return null;
                } catch (Exception e9) {
                    c0320d2.l(aVar2, str4, V.f2549h, zzie.CONSUME_PURCHASE_SERVICE_CALL_EXCEPTION, "Error consuming purchase!", e9);
                    return null;
                }
            case 2:
                C0320d c0320d3 = this.f2497b;
                com.revenuecat.purchases.google.usecase.c cVar = (com.revenuecat.purchases.google.usecase.c) this.f2498c;
                C0341z c0341z = (C0341z) this.f2499d;
                if (!c0320d3.v()) {
                    zzie zzieVar5 = zzie.SERVICE_CONNECTION_NOT_READY;
                    C0328l c0328l5 = V.f2551j;
                    c0320d3.I(7, c0328l5, zzieVar5);
                    cVar.a(c0328l5, new A(zzbt.zzk(), zzbt.zzk()));
                } else {
                    if (c0320d3.f2610u) {
                        ArrayList arrayList = new ArrayList();
                        ArrayList arrayList2 = new ArrayList();
                        String str7 = ((C0340y) c0341z.f2678a.get(0)).f2677b;
                        zzbt zzbtVar = c0341z.f2678a;
                        int size = zzbtVar.size();
                        int i9 = 0;
                        while (true) {
                            if (i9 >= size) {
                                o6 = new O(0, "", arrayList, arrayList2);
                            } else {
                                int i10 = i9 + 20;
                                ArrayList<C0340y> arrayList3 = new ArrayList(zzbtVar.subList(i9, i10 > size ? size : i10));
                                ArrayList<String> arrayList4 = new ArrayList<>();
                                int size2 = arrayList3.size();
                                for (int i11 = i6; i11 < size2; i11 += i7) {
                                    arrayList4.add(((C0340y) arrayList3.get(i11)).f2676a);
                                }
                                Bundle bundle3 = new Bundle();
                                bundle3.putStringArrayList("ITEM_ID_LIST", arrayList4);
                                String str8 = c0320d3.f2593c;
                                bundle3.putString("playBillingLibraryVersion", str8);
                                try {
                                    synchronized (c0320d3.f2591a) {
                                        zzamVar3 = c0320d3.f2599i;
                                        break;
                                    }
                                    if (zzamVar3 == null) {
                                        o6 = c0320d3.A(V.f2551j, zzie.SERVICE_RESET_TO_NULL, "Service has been reset to null.", exc);
                                    } else {
                                        boolean z7 = (c0320d3.f2612w && c0320d3.f2586C.f2641a) ? i7 : 0;
                                        c0320d3.E();
                                        c0320d3.E();
                                        c0320d3.E();
                                        c0320d3.E();
                                        zza zzaVarZza = zza.zza(z7, true, false, true, false, true);
                                        int i12 = i7;
                                        Bundle bundleZzj = zzamVar3.zzj(i7 != c0320d3.f2613x ? 17 : 20, c0320d3.f2597g.getPackageName(), str7, bundle3, zzc.zzf(str8, c0320d3.f2594d, arrayList3, null, null, zzaVarZza, c0320d3.f2589F.longValue()));
                                        if (bundleZzj == null) {
                                            o6 = c0320d3.A(V.f2537A, zzie.NULL_BUNDLE_FROM_GET_SKU_DETAILS_SERVICE_CALL, "queryProductDetailsAsync got empty product details response.", null);
                                        } else if (bundleZzj.containsKey("DETAILS_LIST")) {
                                            ArrayList<String> stringArrayList = bundleZzj.getStringArrayList("DETAILS_LIST");
                                            if (stringArrayList == null) {
                                                o6 = c0320d3.A(V.f2537A, zzie.NULL_DETAILS_LIST_IN_GET_SKU_DETAILS_RESPONSE, "queryProductDetailsAsync got null response list", null);
                                            } else {
                                                ArrayList arrayList5 = new ArrayList();
                                                int size3 = stringArrayList.size();
                                                int i13 = 0;
                                                while (i13 < size3) {
                                                    try {
                                                        C0336u c0336u = new C0336u(stringArrayList.get(i13));
                                                        zzc.zzm("BillingClient", "Got product details: ".concat(c0336u.toString()));
                                                        arrayList5.add(c0336u);
                                                        i13++;
                                                        zzbtVar = zzbtVar;
                                                    } catch (JSONException e10) {
                                                        o6 = c0320d3.A(V.a(6, "Error trying to decode SkuDetails."), zzie.ERROR_DECODING_SKU_DETAILS, "Got a JSON exception trying to decode ProductDetails. \n Exception: ", e10);
                                                    }
                                                }
                                                zzbt zzbtVar2 = zzbtVar;
                                                ArrayList<String> stringArrayList2 = bundleZzj.getStringArrayList("UNFETCHED_PRODUCT_LIST");
                                                new ArrayList();
                                                try {
                                                    ArrayList arrayList6 = new ArrayList();
                                                    if (stringArrayList2 != null) {
                                                        Iterator<String> it = stringArrayList2.iterator();
                                                        while (it.hasNext()) {
                                                            D d6 = new D(it.next());
                                                            zzc.zzm("BillingClient", "Got unfetchedProduct: ".concat(d6.toString()));
                                                            arrayList6.add(d6);
                                                        }
                                                    } else {
                                                        for (C0340y c0340y : arrayList3) {
                                                            Iterator it2 = arrayList5.iterator();
                                                            while (true) {
                                                                if (it2.hasNext()) {
                                                                    C0336u c0336u2 = (C0336u) it2.next();
                                                                    if (!c0340y.f2676a.equals(c0336u2.f2667c) || !c0340y.f2677b.equals(c0336u2.f2668d)) {
                                                                    }
                                                                } else {
                                                                    arrayList6.add(new D(new JSONObject().put("productId", c0340y.f2676a).put("type", c0340y.f2677b).put("statusCode", 0).toString()));
                                                                }
                                                            }
                                                        }
                                                    }
                                                    arrayList.addAll(arrayList5);
                                                    arrayList2.addAll(arrayList6);
                                                    i9 = i10;
                                                    zzbtVar = zzbtVar2;
                                                    i7 = i12;
                                                    i6 = 0;
                                                    exc = null;
                                                } catch (JSONException e11) {
                                                    o6 = c0320d3.A(V.a(6, "Error trying to decode SkuDetails."), zzie.ERROR_DECODING_SKU_DETAILS, "Got a JSON exception trying to decode UnfetchedProduct. \n Exception: ", e11);
                                                }
                                            }
                                        } else {
                                            int iZzb = zzc.zzb(bundleZzj, "BillingClient");
                                            String strZzj2 = zzc.zzj(bundleZzj, "BillingClient");
                                            o6 = iZzb != 0 ? c0320d3.A(V.a(iZzb, strZzj2), zzie.BILLING_RESULT_RECEIVED_FROM_PHONESKY, Z0.o.l("getSkuDetails() failed for queryProductDetailsAsync. Response code: ", iZzb), null) : c0320d3.A(V.a(6, strZzj2), zzie.MISSING_DETAILS_LIST_IN_GET_SKU_DETAILS_RESPONSE, "getSkuDetails() returned a bundle with neither an error nor a product detail list for queryProductDetailsAsync.", null);
                                        }
                                    }
                                } catch (DeadObjectException e12) {
                                    o6 = c0320d3.A(V.f2551j, zzie.GET_SKU_DETAILS_SERVICE_CALL_EXCEPTION, "queryProductDetailsAsync got a remote exception (try to reconnect).", e12);
                                } catch (Exception e13) {
                                    o6 = c0320d3.A(V.f2549h, zzie.GET_SKU_DETAILS_SERVICE_CALL_EXCEPTION, "queryProductDetailsAsync got a remote exception (try to reconnect).", e13);
                                }
                            }
                        }
                        cVar.a(V.a(o6.f2523a, (String) o6.f2526d), new A((ArrayList) o6.f2524b, (ArrayList) o6.f2525c));
                        return null;
                    }
                    zzc.zzn("BillingClient", "Querying product details is not supported.");
                    zzie zzieVar6 = zzie.PRODUCT_DETAILS_NOT_SUPPORTED;
                    C0328l c0328l6 = V.f2558r;
                    c0320d3.I(7, c0328l6, zzieVar6);
                    cVar.a(c0328l6, new A(zzbt.zzk(), zzbt.zzk()));
                }
                return null;
            case 3:
                return a();
            default:
                C0320d c0320d4 = this.f2497b;
                String str9 = (String) this.f2498c;
                String str10 = (String) this.f2499d;
                c0320d4.getClass();
                try {
                    synchronized (c0320d4.f2591a) {
                        zzamVar4 = c0320d4.f2599i;
                        break;
                    }
                    return zzamVar4 == null ? zzc.zzd(V.f2551j, zzie.SERVICE_RESET_TO_NULL) : zzamVar4.zzf(3, c0320d4.f2597g.getPackageName(), str9, str10, null);
                } catch (DeadObjectException e14) {
                    return zzc.zze(V.f2551j, zzie.LAUNCH_BILLING_FLOW_EXCEPTION, T.a(e14));
                } catch (Exception e15) {
                    return zzc.zze(V.f2549h, zzie.LAUNCH_BILLING_FLOW_EXCEPTION, T.a(e15));
                }
        }
    }

    public E(C0320d c0320d, InterfaceC0338w interfaceC0338w, String str) {
        this.f2496a = 3;
        this.f2498c = interfaceC0338w;
        this.f2499d = str;
        Objects.requireNonNull(c0320d);
        this.f2497b = c0320d;
    }
}
