package com.android.billingclient.api; import android.os.Bundle; import com.android.billingclient.api.d; import com.google.android.gms.internal.play_billing.zzb; import java.util.ArrayList; /* loaded from: classes.dex */ abstract class g0 { static f0 a(Bundle bundle, String str, String str2) { d dVar = u.f4083j; if (bundle == null) { zzb.zzk("BillingClient", String.format("%s got null owned items list", str2)); return new f0(dVar, 54); } int zzb = zzb.zzb(bundle, "BillingClient"); String zzg = zzb.zzg(bundle, "BillingClient"); d.a c10 = d.c(); c10.c(zzb); c10.b(zzg); d a10 = c10.a(); if (zzb != 0) { zzb.zzk("BillingClient", String.format("%s failed. Response code: %s", str2, Integer.valueOf(zzb))); return new f0(a10, 23); } if (!bundle.containsKey("INAPP_PURCHASE_ITEM_LIST") || !bundle.containsKey("INAPP_PURCHASE_DATA_LIST") || !bundle.containsKey("INAPP_DATA_SIGNATURE_LIST")) { zzb.zzk("BillingClient", String.format("Bundle returned from %s doesn't contain required fields.", str2)); return new f0(dVar, 55); } ArrayList stringArrayList = bundle.getStringArrayList("INAPP_PURCHASE_ITEM_LIST"); ArrayList stringArrayList2 = bundle.getStringArrayList("INAPP_PURCHASE_DATA_LIST"); ArrayList stringArrayList3 = bundle.getStringArrayList("INAPP_DATA_SIGNATURE_LIST"); if (stringArrayList == null) { zzb.zzk("BillingClient", String.format("Bundle returned from %s contains null SKUs list.", str2)); return new f0(dVar, 56); } if (stringArrayList2 == null) { zzb.zzk("BillingClient", String.format("Bundle returned from %s contains null purchases list.", str2)); return new f0(dVar, 57); } if (stringArrayList3 != null) { return new f0(u.f4085l, 1); } zzb.zzk("BillingClient", String.format("Bundle returned from %s contains null signatures list.", str2)); return new f0(dVar, 58); } }