package defpackage;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import j$.util.concurrent.ConcurrentHashMap;
import java.util.ArrayList;
import java.util.Collections;

/* renamed from: ᵡﹶ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final /* synthetic */ class C3238 implements InterfaceC5454 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ Context f12178;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f12179;

    public /* synthetic */ C3238(Context context, int i) {
        this.f12179 = i;
        this.f12178 = context;
    }

    @Override // defpackage.InterfaceC5454
    public final Object get() {
        int i = this.f12179;
        Context context = this.f12178;
        switch (i) {
            case 0:
                Object obj = C2678.f10393;
                final C3460 c3460 = new C3460();
                c3460.f12987 = context;
                context.getClass();
                if (((InterfaceC5454) c3460.f12991) == null) {
                    c3460.f12991 = C2678.f10392;
                }
                final int i2 = 1;
                if (((InterfaceC5454) c3460.f12990) == null) {
                    c3460.f12990 = AbstractC0220.m1513(new C3238((Context) c3460.f12987, i2));
                }
                if (((C2788) c3460.f12988) == null) {
                    c3460.f12988 = new InterfaceC5454() { // from class: ᵜ
                        @Override // defpackage.InterfaceC5454
                        public final Object get() throws PackageManager.NameNotFoundException {
                            int i3 = i2;
                            C3460 c34602 = c3460;
                            switch (i3) {
                                case 0:
                                    Context context2 = (Context) c34602.f12987;
                                    Object obj2 = C2678.f10393;
                                    try {
                                        ApplicationInfo applicationInfo = context2.getPackageManager().getApplicationInfo("com.google.android.gms", 0);
                                        applicationInfo.getClass();
                                        return new C4216(applicationInfo);
                                    } catch (PackageManager.NameNotFoundException unused) {
                                        return C3988.f15030;
                                    }
                                default:
                                    return new C4216(new C4991((InterfaceC5454) c34602.f12991));
                            }
                        }
                    };
                }
                final int i3 = 0;
                if (((InterfaceC5454) c3460.f12986) == null) {
                    Context context2 = (Context) c3460.f12987;
                    ArrayList arrayList = new ArrayList();
                    C4745 c4745 = new C4745(new C4081(context2, 3));
                    new ConcurrentHashMap();
                    Collections.addAll(arrayList, c4745, new C0428());
                    c3460.f12986 = AbstractC0220.m1513(new C3188(i3, arrayList));
                }
                if (((C2788) c3460.f12989) == null) {
                    c3460.f12989 = new InterfaceC5454() { // from class: ᵜ
                        @Override // defpackage.InterfaceC5454
                        public final Object get() throws PackageManager.NameNotFoundException {
                            int i32 = i3;
                            C3460 c34602 = c3460;
                            switch (i32) {
                                case 0:
                                    Context context22 = (Context) c34602.f12987;
                                    Object obj2 = C2678.f10393;
                                    try {
                                        ApplicationInfo applicationInfo = context22.getPackageManager().getApplicationInfo("com.google.android.gms", 0);
                                        applicationInfo.getClass();
                                        return new C4216(applicationInfo);
                                    } catch (PackageManager.NameNotFoundException unused) {
                                        return C3988.f15030;
                                    }
                                default:
                                    return new C4216(new C4991((InterfaceC5454) c34602.f12991));
                            }
                        }
                    };
                }
                return new C2678((Context) c3460.f12987, (InterfaceC5454) c3460.f12991, (InterfaceC5454) c3460.f12990, (C2788) c3460.f12988, (InterfaceC5454) c3460.f12986, (C2788) c3460.f12989);
            case 1:
                Object obj2 = C2678.f10393;
                return new C3571(new C2182(context, AbstractC4928.f18327, InterfaceC0416.f2318, C1737.f6944));
            default:
                Object obj3 = AbstractC4558.f16953;
                return AbstractC2602.m6520(context);
        }
    }
}
