package n0;

import android.app.job.JobParameters;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcel;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Pair;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.WebView;
import android.widget.OverScroller;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.work.impl.WorkDatabase;
import com.google.android.gms.ads.AdFormat;
import com.google.android.gms.ads.internal.overlay.s;
import com.google.android.gms.ads.nonagon.signalgeneration.n0;
import com.google.android.gms.ads.nonagon.signalgeneration.p0;
import com.google.android.gms.common.api.internal.a1;
import com.google.android.gms.common.api.internal.x;
import com.google.android.gms.common.internal.w;
import com.google.android.gms.internal.ads.gr0;
import com.google.android.gms.internal.measurement.f0;
import com.google.android.gms.internal.measurement.i0;
import com.google.android.gms.internal.measurement.j0;
import com.google.android.gms.internal.measurement.t2;
import com.google.android.gms.internal.measurement.x0;
import com.google.android.gms.internal.measurement.zzc;
import com.google.android.gms.measurement.internal.a3;
import com.google.android.gms.measurement.internal.b1;
import com.google.android.gms.measurement.internal.c2;
import com.google.android.gms.measurement.internal.d4;
import com.google.android.gms.measurement.internal.e1;
import com.google.android.gms.measurement.internal.h0;
import com.google.android.gms.measurement.internal.i4;
import com.google.android.gms.measurement.internal.j1;
import com.google.android.gms.measurement.internal.j4;
import com.google.android.gms.measurement.internal.l3;
import com.google.android.gms.measurement.internal.m1;
import com.google.android.gms.measurement.internal.n3;
import com.google.android.gms.measurement.internal.r1;
import com.google.android.gms.measurement.internal.y;
import com.google.android.gms.measurement.internal.z3;
import com.google.android.gms.measurement.internal.zzje$zza;
import com.google.android.material.appbar.p;
import ed.q;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.Callable;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
import n4.r;
import p7.o0;
import p7.t0;
import w8.t;

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

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

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

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

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

    public /* synthetic */ a(gr0 gr0Var, String str, Pair[] pairArr) {
        this.f30717a = 8;
        this.f30718b = gr0Var;
        this.f30719c = str;
        this.f30720d = pairArr;
    }

    private void b() {
        ((l) this.f30718b).b((Typeface) this.f30719c);
    }

    private void c() {
        Object objCall;
        try {
            objCall = ((Callable) this.f30718b).call();
        } catch (Exception unused) {
            objCall = null;
        }
        ((Handler) this.f30720d).post(new a(this, (p0.a) this.f30719c, objCall, 1));
    }

    private void d() {
        ((p0.a) this.f30718b).accept(this.f30719c);
    }

    private void e() {
        n4.o oVarP = ((r) ((WorkDatabase) this.f30718b).workSpecDao()).p((String) this.f30719c);
        if (oVarP == null || !oVarP.b()) {
            return;
        }
        synchronized (((androidx.work.impl.foreground.c) this.f30720d).f4588d) {
            ((androidx.work.impl.foreground.c) this.f30720d).f4591g.put((String) this.f30719c, oVarP);
            ((androidx.work.impl.foreground.c) this.f30720d).f4592h.add(oVarP);
            Object obj = this.f30720d;
            ((androidx.work.impl.foreground.c) obj).f4593i.d(((androidx.work.impl.foreground.c) obj).f4592h);
        }
    }

    private final /* synthetic */ void f() {
        ((s) this.f30718b).h((String) this.f30719c, (Map) this.f30720d);
    }

    private final /* synthetic */ void g() {
        ((o0) this.f30718b).j((Context) this.f30719c);
    }

    private final void h() {
        com.google.android.gms.ads.nonagon.signalgeneration.a aVar = (com.google.android.gms.ads.nonagon.signalgeneration.a) this.f30718b;
        Bundle bundle = (Bundle) this.f30719c;
        w7.b bVar = (w7.b) this.f30720d;
        aVar.getClass();
        t0 t0Var = m7.n.C.f30467f;
        Context context = aVar.f7989a;
        CookieManager cookieManagerZza = t0Var.zza(context);
        bundle.putBoolean("accept_3p_cookie", cookieManagerZza != null ? cookieManagerZza.acceptThirdPartyCookies(aVar.f7990b) : false);
        AdFormat adFormat = AdFormat.BANNER;
        g7.e eVar = (g7.e) new g7.e().d(bundle);
        eVar.getClass();
        w7.a.generate(context, adFormat, new g7.f(eVar), bVar);
    }

    private final void i() {
        CookieManager cookieManagerZza;
        n0 n0Var = (n0) this.f30718b;
        Object obj = this.f30719c;
        Pair pair = (Pair) this.f30720d;
        n0Var.getClass();
        boolean zAcceptThirdPartyCookies = false;
        if ((obj instanceof WebView) && (cookieManagerZza = m7.n.C.f30467f.zza(n0Var.f8068c)) != null) {
            zAcceptThirdPartyCookies = cookieManagerZza.acceptThirdPartyCookies((WebView) obj);
        }
        HashMap map = n0Var.f8066a;
        Boolean boolValueOf = Boolean.valueOf(zAcceptThirdPartyCookies);
        p0 p0Var = (p0) map.get(boolValueOf);
        if (p0Var != null) {
            m7.n.C.f30472k.getClass();
            if (p0Var.f8105b > System.currentTimeMillis()) {
                n0Var.e(p0Var, pair, true);
                return;
            }
        }
        HashMap map2 = n0Var.f8067b;
        List arrayList = (List) map2.get(boolValueOf);
        if (arrayList == null) {
            arrayList = new ArrayList();
            map2.put(boolValueOf, arrayList);
        }
        arrayList.add(pair);
    }

    private final void j() {
        int i10;
        t tVarB;
        d8.a aVar = (d8.a) this.f30719c;
        if (TextUtils.isEmpty(aVar.getMessageId())) {
            tVarB = w8.k.e(null);
        } else {
            Bundle bundle = new Bundle();
            bundle.putString("google.message_id", aVar.getMessageId());
            Integer numZza = aVar.zza();
            if (numZza != null) {
                bundle.putInt("google.product_id", numZza.intValue());
            }
            Context context = (Context) this.f30718b;
            bundle.putBoolean("supports_message_handled", true);
            d8.o oVarA = d8.o.a(context);
            synchronized (oVarA) {
                i10 = oVarA.f25044d;
                oVarA.f25044d = i10 + 1;
            }
            tVarB = oVarA.b(new d8.m(i10, 2, bundle, 0));
        }
        tVarB.a(d8.h.f25021a, new nb.c((CountDownLatch) this.f30720d, 16));
    }

    private final void k() {
        Bundle bundle;
        a1 a1Var = (a1) this.f30720d;
        if (a1Var.f8220b > 0) {
            com.google.android.gms.common.api.internal.h hVar = (com.google.android.gms.common.api.internal.h) this.f30718b;
            if (a1Var.c() != null) {
                bundle = a1Var.c().getBundle((String) this.f30719c);
            } else {
                bundle = null;
            }
            hVar.onCreate(bundle);
        }
        if (a1Var.f8220b >= 2) {
            x xVar = (x) ((com.google.android.gms.common.api.internal.h) this.f30718b);
            xVar.f8299b = true;
            xVar.c();
        }
        if (a1Var.f8220b >= 3) {
            ((x) ((com.google.android.gms.common.api.internal.h) this.f30718b)).c();
        }
        if (a1Var.f8220b >= 4) {
            x xVar2 = (x) ((com.google.android.gms.common.api.internal.h) this.f30718b);
            xVar2.f8299b = false;
            xVar2.f8304g.b(xVar2);
        }
        if (a1Var.f8220b >= 5) {
            ((com.google.android.gms.common.api.internal.h) this.f30718b).getClass();
        }
    }

    private final void l() {
        b1 b1Var = (b1) this.f30720d;
        com.google.android.gms.measurement.internal.a1 a1Var = b1Var.f21484b;
        String str = b1Var.f21483a;
        i0 i0Var = (i0) this.f30718b;
        m1 m1Var = a1Var.f21469a;
        j1 j1Var = m1Var.f21758j;
        m1.d(j1Var);
        j1Var.w();
        com.google.android.gms.measurement.internal.p0 p0Var = m1Var.f21757i;
        if (i0Var != null) {
            Bundle bundle = new Bundle();
            bundle.putString("package_name", str);
            try {
                j0 j0Var = (j0) i0Var;
                Parcel parcelG = j0Var.G();
                f0.c(parcelG, bundle);
                Parcel parcelW = j0Var.W(1, parcelG);
                Bundle bundle2 = (Bundle) f0.a(parcelW, Bundle.CREATOR);
                parcelW.recycle();
                if (bundle2 == null) {
                    m1.d(p0Var);
                    p0Var.f21834f.c("Install Referrer Service returned a null response");
                }
            } catch (Exception e10) {
                m1.d(p0Var);
                p0Var.f21834f.b(e10.getMessage(), "Exception occurred while retrieving the Install Referrer");
            }
        } else {
            m1.d(p0Var);
            p0Var.f21837i.c("Attempting to use Install Referrer Service while it is not initialized");
        }
        j1 j1Var2 = a1Var.f21469a.f21758j;
        m1.d(j1Var2);
        j1Var2.w();
        throw new IllegalStateException("Unexpected call on client side");
    }

    private final void m() {
        synchronized (((AtomicReference) this.f30718b)) {
            try {
                try {
                } catch (RemoteException e10) {
                    ((a3) this.f30720d).zzj().f21834f.b(e10, "Failed to get app instance id");
                }
                if (!((a3) this.f30720d).u().H().i(zzje$zza.ANALYTICS_STORAGE)) {
                    ((a3) this.f30720d).zzj().f21839k.c("Analytics storage consent denied; will not get app instance id");
                    ((a3) this.f30720d).z().c0(null);
                    ((a3) this.f30720d).u().f21990h.g(null);
                    ((AtomicReference) this.f30718b).set(null);
                    return;
                }
                Object obj = this.f30720d;
                h0 h0Var = ((a3) obj).f21472d;
                if (h0Var == null) {
                    ((a3) obj).zzj().f21834f.c("Failed to get app instance id");
                    return;
                }
                w.checkNotNull((d4) this.f30719c);
                ((AtomicReference) this.f30718b).set(h0Var.zzb((d4) this.f30719c));
                String str = (String) ((AtomicReference) this.f30718b).get();
                if (str != null) {
                    ((a3) this.f30720d).z().c0(str);
                    ((a3) this.f30720d).u().f21990h.g(str);
                }
                ((a3) this.f30720d).R();
                ((AtomicReference) this.f30718b).notify();
            } finally {
                ((AtomicReference) this.f30718b).notify();
            }
        }
    }

    public final void a(Exception exc) {
        StringWriter stringWriter = new StringWriter();
        exc.printStackTrace(new PrintWriter(stringWriter));
        ((ed.t) this.f30719c).error("Exception encountered", ((q) this.f30718b).f25842a, stringWriter.toString());
    }

    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:46:0x00a1  */
    @Override // java.lang.Runnable
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void run() throws Throwable {
        Exception e10;
        t2 t2Var;
        List list;
        List<com.google.android.gms.internal.measurement.c> list2;
        com.google.android.gms.measurement.internal.x xVar;
        OverScroller overScroller;
        boolean zI = false;
        byte b10 = 0;
        zI = false;
        String str = null;
        String str2 = null;
        String str3 = null;
        switch (this.f30717a) {
            case 0:
                b();
                return;
            case 1:
                d();
                return;
            case 2:
                c();
                return;
            case 3:
                e();
                return;
            case 4:
                f();
                return;
            case 5:
                g();
                return;
            case 6:
                h();
                return;
            case 7:
                i();
                return;
            case 8:
                String str4 = (String) this.f30719c;
                Pair[] pairArr = (Pair[]) this.f30720d;
                gr0 gr0Var = (gr0) this.f30718b;
                gr0Var.getClass();
                ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap(gr0Var.f12608a);
                if (!TextUtils.isEmpty("action") && !TextUtils.isEmpty(str4)) {
                    concurrentHashMap.put("action", str4);
                }
                for (Pair pair : pairArr) {
                    String str5 = (String) pair.first;
                    String str6 = (String) pair.second;
                    if (!TextUtils.isEmpty(str5) && !TextUtils.isEmpty(str6)) {
                        concurrentHashMap.put(str5, str6);
                    }
                }
                gr0Var.a(false, concurrentHashMap);
                return;
            case 9:
                j();
                return;
            case 10:
                k();
                return;
            case 11:
                l();
                throw null;
            case 12:
                ((r1) this.f30720d).f21881a.Y();
                if (((com.google.android.gms.measurement.internal.e) this.f30718b).f21543b.zza() == null) {
                    ((r1) this.f30720d).f21881a.l((com.google.android.gms.measurement.internal.e) this.f30718b, (d4) this.f30719c);
                    return;
                } else {
                    ((r1) this.f30720d).f21881a.D((com.google.android.gms.measurement.internal.e) this.f30718b, (d4) this.f30719c);
                    return;
                }
            case 13:
                r1 r1Var = (r1) this.f30720d;
                y yVar = (y) this.f30718b;
                r1Var.getClass();
                if ("_cmp".equals(yVar.f21981a) && (xVar = yVar.f21982b) != null) {
                    Bundle bundle = xVar.f21970a;
                    if (bundle.size() != 0) {
                        String string = bundle.getString("_cis");
                        if ("referrer broadcast".equals(string) || "referrer API".equals(string)) {
                            r1Var.f21881a.zzj().f21840l.b(yVar.toString(), "Event has been filtered ");
                            yVar = new y("_cmpx", yVar.f21982b, yVar.f21983c, yVar.f21984d);
                        }
                    }
                }
                String str7 = yVar.f21981a;
                r1 r1Var2 = (r1) this.f30720d;
                d4 d4Var = (d4) this.f30719c;
                z3 z3Var = r1Var2.f21881a;
                e1 e1Var = z3Var.f22084a;
                j4 j4Var = z3Var.f22090g;
                z3.o(e1Var);
                String str8 = d4Var.zza;
                if (TextUtils.isEmpty(str8) || (t2Var = (t2) e1Var.f21552h.get(str8)) == null || t2Var.p() == 0) {
                    r1Var2.O0(yVar, d4Var);
                    return;
                }
                z3Var.zzj().f21842n.b(d4Var.zza, "EES config found for");
                e1 e1Var2 = z3Var.f22084a;
                z3.o(e1Var2);
                String str9 = d4Var.zza;
                com.google.android.gms.internal.measurement.w wVar = TextUtils.isEmpty(str9) ? null : (com.google.android.gms.internal.measurement.w) e1Var2.f21554j.b(str9);
                if (wVar == null) {
                    z3Var.zzj().f21842n.b(d4Var.zza, "EES not loaded for");
                    r1Var2.O0(yVar, d4Var);
                    return;
                }
                try {
                    z3.o(j4Var);
                    HashMap mapQ = j4.Q(true, yVar.f21982b.x());
                    String strZ = com.bumptech.glide.g.z(str7, c2.f21500c, c2.f21498a);
                    if (strZ == null) {
                        strZ = str7;
                    }
                    if (wVar.b(new com.google.android.gms.internal.measurement.c(strZ, mapQ, yVar.f21984d))) {
                        xyz.stream.utils.t tVar = wVar.f20507c;
                        boolean z10 = !((com.google.android.gms.internal.measurement.c) tVar.f36174d).equals((com.google.android.gms.internal.measurement.c) tVar.f36172b);
                        xyz.stream.utils.t tVar2 = wVar.f20507c;
                        if (z10) {
                            z3Var.zzj().f21842n.b(str7, "EES edited event");
                            z3.o(j4Var);
                            r1Var2.O0(j4.L((com.google.android.gms.internal.measurement.c) tVar2.f36174d), d4Var);
                        } else {
                            r1Var2.O0(yVar, d4Var);
                        }
                        xyz.stream.utils.t tVar3 = wVar.f20507c;
                        switch (tVar3.f36171a) {
                            case 11:
                                list = (List) tVar3.f36173c;
                                break;
                            default:
                                list = (List) tVar3.f36173c;
                                break;
                        }
                        if (!list.isEmpty()) {
                            switch (tVar2.f36171a) {
                                case 11:
                                    list2 = (List) tVar2.f36173c;
                                    break;
                                default:
                                    list2 = (List) tVar2.f36173c;
                                    break;
                            }
                            for (com.google.android.gms.internal.measurement.c cVar : list2) {
                                z3Var.zzj().f21842n.b(cVar.f20135a, "EES logging created event");
                                z3.o(j4Var);
                                r1Var2.O0(j4.L(cVar), d4Var);
                            }
                            return;
                        }
                        return;
                    }
                } catch (zzc unused) {
                    z3Var.zzj().f21834f.a(d4Var.zzb, str7, "EES error. appId, eventName");
                }
                z3Var.zzj().f21842n.b(str7, "EES was not applied to event");
                r1Var2.O0(yVar, d4Var);
                return;
            case 14:
                ((r1) this.f30720d).f21881a.Y();
                ((r1) this.f30720d).f21881a.n((y) this.f30718b, (String) this.f30719c);
                return;
            case 15:
                ((r1) this.f30720d).f21881a.Y();
                if (((i4) this.f30718b).zza() == null) {
                    ((r1) this.f30720d).f21881a.s(((i4) this.f30718b).f21666b, (d4) this.f30719c);
                    return;
                } else {
                    ((r1) this.f30720d).f21881a.p((i4) this.f30718b, (d4) this.f30719c);
                    return;
                }
            case 16:
                m();
                return;
            case 17:
                try {
                    if (!((a3) this.f30720d).u().H().i(zzje$zza.ANALYTICS_STORAGE)) {
                        ((a3) this.f30720d).zzj().f21839k.c("Analytics storage consent denied; will not get app instance id");
                        ((a3) this.f30720d).z().c0(null);
                        ((a3) this.f30720d).u().f21990h.g(null);
                        return;
                    }
                    Object obj = this.f30720d;
                    h0 h0Var = ((a3) obj).f21472d;
                    if (h0Var == null) {
                        ((a3) obj).zzj().f21834f.c("Failed to get app instance id");
                        return;
                    }
                    w.checkNotNull((d4) this.f30718b);
                    String strZzb = h0Var.zzb((d4) this.f30718b);
                    if (strZzb != null) {
                        ((a3) this.f30720d).z().c0(strZzb);
                        ((a3) this.f30720d).u().f21990h.g(strZzb);
                    }
                    ((a3) this.f30720d).R();
                    ((a3) this.f30720d).v().Z(strZzb, (x0) this.f30719c);
                    return;
                } catch (RemoteException e11) {
                    ((a3) this.f30720d).zzj().f21834f.b(e11, "Failed to get app instance id");
                    return;
                } finally {
                    ((a3) this.f30720d).v().Z(null, (x0) this.f30719c);
                }
            case 18:
                a3 a3Var = (a3) this.f30720d;
                h0 h0Var2 = a3Var.f21472d;
                if (h0Var2 == null) {
                    a3Var.zzj().f21834f.c("Failed to send default event parameters to service");
                    return;
                }
                try {
                    w.checkNotNull((d4) this.f30718b);
                    h0Var2.mo9s((Bundle) this.f30719c, (d4) this.f30718b);
                    return;
                } catch (RemoteException e12) {
                    ((a3) this.f30720d).zzj().f21834f.b(e12, "Failed to send default event parameters to service");
                    return;
                }
            case 19:
                l3 l3Var = (l3) this.f30718b;
                com.google.android.gms.measurement.internal.p0 p0Var = (com.google.android.gms.measurement.internal.p0) this.f30719c;
                JobParameters jobParameters = (JobParameters) this.f30720d;
                l3Var.getClass();
                p0Var.f21842n.c("AppMeasurementJobService processed last upload request.");
                ((n3) l3Var.f21736a).zza(jobParameters, false);
                return;
            case 20:
                if (((View) this.f30719c) == null || (overScroller = ((p) this.f30720d).f22208c) == null) {
                    return;
                }
                if (!overScroller.computeScrollOffset()) {
                    ((p) this.f30720d).A((CoordinatorLayout) this.f30718b, (View) this.f30719c);
                    return;
                }
                p pVar = (p) this.f30720d;
                pVar.C((CoordinatorLayout) this.f30718b, (View) this.f30719c, pVar.f22208c.getCurrY());
                ((View) this.f30719c).postOnAnimation(this);
                return;
            case 21:
                try {
                    try {
                        try {
                            ((lc.b) this.f30720d).f30209b.f30842f = (Map) ((Map) ((q) this.f30718b).f25843b).get("options");
                            ((lc.b) this.f30720d).f30209b.f();
                        } catch (Exception e13) {
                            e10 = e13;
                        }
                        try {
                            String str10 = ((q) this.f30718b).f25842a;
                            switch (str10.hashCode()) {
                                case -1335458389:
                                    b10 = str10.equals("delete") ? (byte) 4 : (byte) -1;
                                    break;
                                case -358737930:
                                    if (str10.equals("deleteAll")) {
                                        b10 = 5;
                                        break;
                                    }
                                    break;
                                case 3496342:
                                    if (str10.equals("read")) {
                                        b10 = 1;
                                        break;
                                    }
                                    break;
                                case 113399775:
                                    if (str10.equals("write")) {
                                        break;
                                    }
                                    break;
                                case 208013248:
                                    if (str10.equals("containsKey")) {
                                        b10 = 3;
                                        break;
                                    }
                                    break;
                                case 1080375339:
                                    if (str10.equals("readAll")) {
                                        b10 = 2;
                                        break;
                                    }
                                    break;
                                default:
                                    break;
                            }
                            if (b10 == 0) {
                                String strA = lc.b.a((lc.b) this.f30720d, (q) this.f30718b);
                                lc.b bVar = (lc.b) this.f30720d;
                                q qVar = (q) this.f30718b;
                                bVar.getClass();
                                String str11 = (String) ((Map) qVar.f25843b).get("value");
                                if (str11 == null) {
                                    ((ed.t) this.f30719c).error("null", null, null);
                                    return;
                                } else {
                                    ((lc.b) this.f30720d).f30209b.B(strA, str11);
                                    ((ed.t) this.f30719c).success(null);
                                    return;
                                }
                            }
                            if (b10 == 1) {
                                String strA2 = lc.b.a((lc.b) this.f30720d, (q) this.f30718b);
                                r rVar = ((lc.b) this.f30720d).f30209b;
                                rVar.e();
                                if (!((SharedPreferences) rVar.f30844h).contains(strA2)) {
                                    ((ed.t) this.f30719c).success(null);
                                    return;
                                }
                                r rVar2 = ((lc.b) this.f30720d).f30209b;
                                rVar2.e();
                                String string2 = ((SharedPreferences) rVar2.f30844h).getString(strA2, null);
                                if (!rVar2.o()) {
                                    string2 = rVar2.b(string2);
                                }
                                ((ed.t) this.f30719c).success(string2);
                                return;
                            }
                            if (b10 == 2) {
                                ((ed.t) this.f30719c).success(((lc.b) this.f30720d).f30209b.w());
                                return;
                            }
                            if (b10 == 3) {
                                String strA3 = lc.b.a((lc.b) this.f30720d, (q) this.f30718b);
                                r rVar3 = ((lc.b) this.f30720d).f30209b;
                                rVar3.e();
                                ((ed.t) this.f30719c).success(Boolean.valueOf(((SharedPreferences) rVar3.f30844h).contains(strA3)));
                                return;
                            }
                            if (b10 == 4) {
                                ((lc.b) this.f30720d).f30209b.c(lc.b.a((lc.b) this.f30720d, (q) this.f30718b));
                                ((ed.t) this.f30719c).success(null);
                                return;
                            } else if (b10 != 5) {
                                ((ed.t) this.f30719c).notImplemented();
                                return;
                            } else {
                                ((lc.b) this.f30720d).f30209b.d();
                                ((ed.t) this.f30719c).success(null);
                                return;
                            }
                        } catch (Exception e14) {
                            e10 = e14;
                            zI = ((lc.b) this.f30720d).f30209b.i();
                            if (!zI) {
                                a(e10);
                                return;
                            }
                            try {
                                ((lc.b) this.f30720d).f30209b.d();
                                ((ed.t) this.f30719c).success("Data has been reset");
                                return;
                            } catch (Exception e15) {
                                a(e15);
                                return;
                            }
                        }
                    } catch (FileNotFoundException e16) {
                        e16.getLocalizedMessage();
                        return;
                    }
                } catch (Exception e17) {
                    e10 = e17;
                }
                break;
            default:
                synchronized (com.tekartik.sqflite.m.f24870f) {
                    com.tekartik.sqflite.m.a((com.tekartik.sqflite.m) this.f30720d, (com.tekartik.sqflite.d) this.f30718b);
                    break;
                }
                ((ed.t) this.f30719c).success(null);
                return;
        }
    }

    public /* synthetic */ a(Object obj, Object obj2, Object obj3, int i10) {
        this.f30717a = i10;
        this.f30720d = obj;
        this.f30718b = obj2;
        this.f30719c = obj3;
    }

    public /* synthetic */ a(Object obj, Object obj2, Object obj3, int i10, int i11) {
        this.f30717a = i10;
        this.f30718b = obj;
        this.f30719c = obj2;
        this.f30720d = obj3;
    }

    public /* synthetic */ a(o0 o0Var, Context context) {
        this.f30717a = 5;
        this.f30718b = o0Var;
        this.f30719c = context;
        this.f30720d = "admob";
    }

    public a(a1 a1Var, com.google.android.gms.common.api.internal.h hVar) {
        this.f30717a = 10;
        this.f30718b = hVar;
        this.f30719c = "ConnectionlessLifecycleHelper";
        Objects.requireNonNull(a1Var);
        this.f30720d = a1Var;
    }
}
