package nb;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import android.os.Trace;
import com.bumptech.glide.load.engine.p;
import com.google.firebase.FirebaseCommonRegistrar;

/* JADX INFO: loaded from: classes2.dex */
public final /* synthetic */ class e implements com.google.firebase.components.e {

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

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

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

    public /* synthetic */ e(String str, Object obj, int i10) {
        this.f31184a = i10;
        this.f31185b = str;
        this.f31186c = obj;
    }

    @Override // com.google.firebase.components.e
    public final Object c(p pVar) {
        int i10 = this.f31184a;
        Object obj = this.f31186c;
        String str = this.f31185b;
        switch (i10) {
            case 0:
                Context context = (Context) pVar.get(Context.class);
                int i11 = ((oa.a) ((f) obj)).f31443a;
                String strValueOf = "";
                switch (i11) {
                    case 8:
                        ApplicationInfo applicationInfo = context.getApplicationInfo();
                        if (applicationInfo != null) {
                            strValueOf = String.valueOf(applicationInfo.targetSdkVersion);
                        }
                        break;
                    case 9:
                        ApplicationInfo applicationInfo2 = context.getApplicationInfo();
                        if (applicationInfo2 != null) {
                            strValueOf = String.valueOf(applicationInfo2.minSdkVersion);
                        }
                        break;
                    case 10:
                        int i12 = Build.VERSION.SDK_INT;
                        if (context.getPackageManager().hasSystemFeature("android.hardware.type.television")) {
                            strValueOf = "tv";
                        } else if (context.getPackageManager().hasSystemFeature("android.hardware.type.watch")) {
                            strValueOf = "watch";
                        } else if (context.getPackageManager().hasSystemFeature("android.hardware.type.automotive")) {
                            strValueOf = "auto";
                        } else if (i12 >= 26 && context.getPackageManager().hasSystemFeature("android.hardware.type.embedded")) {
                            strValueOf = "embedded";
                        }
                        break;
                    default:
                        String installerPackageName = context.getPackageManager().getInstallerPackageName(context.getPackageName());
                        if (installerPackageName != null) {
                            strValueOf = FirebaseCommonRegistrar.a(installerPackageName);
                        }
                        break;
                }
                return new a(str, strValueOf);
            default:
                com.google.firebase.components.a aVar = (com.google.firebase.components.a) obj;
                try {
                    Trace.beginSection(str);
                    return aVar.f24007f.c(pVar);
                } finally {
                    Trace.endSection();
                }
        }
    }
}
