package defpackage;

import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.text.TextUtils;
import com.google.android.gms.dynamite.DynamiteModule$LoadingException;
import j$.util.Objects;

/* JADX INFO: renamed from: ᵵˌˎ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4718 extends AbstractRunnableC1283 {

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final /* synthetic */ Object f17959;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final /* synthetic */ Object f17960;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final /* synthetic */ int f17961 = 1;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final /* synthetic */ Object f17962;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4718(C2957 c2957, Context context, Bundle bundle) {
        super(c2957, true);
        this.f17959 = context;
        this.f17960 = bundle;
        this.f17962 = c2957;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4718(C2957 c2957, String str, String str2) {
        super(c2957, true);
        this.f17959 = str;
        this.f17960 = str2;
        Objects.requireNonNull(c2957);
        this.f17962 = c2957;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4718(C2957 c2957, String str, BinderC0669 binderC0669) {
        super(c2957, true);
        this.f17959 = str;
        this.f17960 = binderC0669;
        Objects.requireNonNull(c2957);
        this.f17962 = c2957;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4718(C3209 c3209, Activity activity, BinderC0669 binderC0669) {
        super((C2957) c3209.f12230, true);
        this.f17959 = activity;
        this.f17960 = binderC0669;
        this.f17962 = c3209;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4718(C3209 c3209, Bundle bundle, Activity activity) {
        super((C2957) c3209.f12230, true);
        this.f17959 = bundle;
        this.f17960 = activity;
        this.f17962 = c3209;
    }

    @Override // defpackage.AbstractRunnableC1283
    /* JADX INFO: renamed from: ʽˈˋ */
    public void mo3207() {
        switch (this.f17961) {
            case 2:
                ((BinderC0669) this.f17960).mo2444(null);
                break;
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // defpackage.AbstractRunnableC1283
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo1825() {
        Boolean boolValueOf;
        Bundle bundle = null;
        InterfaceC5047 interfaceC5047AsInterface = null;
        switch (this.f17961) {
            case 0:
                InterfaceC5047 interfaceC5047 = ((C2957) this.f17962).f11375;
                ᵘᵞʿⁱ.ᵶᵥᵝ(interfaceC5047);
                interfaceC5047.setUserProperty(null, (String) this.f17959, new BinderC3730((String) this.f17960), false, this.f5361);
                break;
            case 1:
                try {
                    Context context = (Context) this.f17959;
                    ᵘᵞʿⁱ.ᵶᵥᵝ(context);
                    String str = ᵲᵧˇ.ˊᵡᵗʨ(context);
                    Resources resources = context.getResources();
                    if (TextUtils.isEmpty(str)) {
                        str = ᵲᵧˇ.ˊᵡᵗʨ(context);
                    }
                    int identifier = resources.getIdentifier("google_analytics_force_disable_updates", "bool", str);
                    if (identifier == 0) {
                        boolValueOf = null;
                    } else {
                        try {
                            boolValueOf = Boolean.valueOf(resources.getBoolean(identifier));
                        } catch (Resources.NotFoundException unused) {
                            boolValueOf = null;
                        }
                    }
                    C2957 c2957 = (C2957) this.f17962;
                    Object[] objArr = boolValueOf == null || !boolValueOf.booleanValue();
                    c2957.getClass();
                    try {
                        interfaceC5047AsInterface = AbstractBinderC5405.asInterface(C0705.m2550(context, objArr != false ? C0705.f3221 : C0705.f3218, "com.google.android.gms.measurement.dynamite").m2556("com.google.android.gms.measurement.internal.AppMeasurementDynamiteService"));
                    } catch (DynamiteModule$LoadingException e) {
                        c2957.m7049(e, true, false);
                    }
                    c2957.f11375 = interfaceC5047AsInterface;
                    if (c2957.f11375 != null) {
                        int iM2552 = C0705.m2552(context, "com.google.android.gms.measurement.dynamite");
                        int iM2554 = C0705.m2554(context, "com.google.android.gms.measurement.dynamite", false);
                        int iMax = Math.max(iM2552, iM2554);
                        boolean z = Boolean.TRUE.equals(boolValueOf) || iM2554 < iM2552;
                        long j = iMax;
                        c2957.f11373 = j;
                        C1216 c1216 = new C1216(161000L, j, z, (Bundle) this.f17960, ᵲᵧˇ.ˊᵡᵗʨ(context));
                        Object[] objArr2 = c2957.f11373 >= 169;
                        InterfaceC5047 interfaceC50472 = c2957.f11375;
                        if (objArr2 != true) {
                            ᵘᵞʿⁱ.ᵶᵥᵝ(interfaceC50472);
                            interfaceC50472.initialize(new BinderC3730(context), c1216, this.f5361);
                        } else {
                            ᵘᵞʿⁱ.ᵶᵥᵝ(interfaceC50472);
                            interfaceC50472.initializeWithElapsedTime(new BinderC3730(context), c1216, this.f5361, this.f5363);
                        }
                    }
                } catch (Exception e2) {
                    ((C2957) this.f17962).m7049(e2, true, false);
                    return;
                }
                break;
            case 2:
                InterfaceC5047 interfaceC50473 = ((C2957) this.f17962).f11375;
                ᵘᵞʿⁱ.ᵶᵥᵝ(interfaceC50473);
                interfaceC50473.getMaxUserProperties((String) this.f17959, (BinderC0669) this.f17960);
                break;
            case 3:
                Bundle bundle2 = (Bundle) this.f17959;
                if (bundle2 != null) {
                    bundle = new Bundle();
                    if (bundle2.containsKey("com.google.app_measurement.screen_service")) {
                        Object obj = bundle2.get("com.google.app_measurement.screen_service");
                        if (obj instanceof Bundle) {
                            bundle.putBundle("com.google.app_measurement.screen_service", (Bundle) obj);
                        }
                    }
                }
                InterfaceC5047 interfaceC50474 = ((C2957) ((C3209) this.f17962).f12230).f11375;
                ᵘᵞʿⁱ.ᵶᵥᵝ(interfaceC50474);
                interfaceC50474.onActivityCreatedByScionActivityInfo(C5379.m10967((Activity) this.f17960), bundle, this.f5363);
                break;
            default:
                InterfaceC5047 interfaceC50475 = ((C2957) ((C3209) this.f17962).f12230).f11375;
                ᵘᵞʿⁱ.ᵶᵥᵝ(interfaceC50475);
                interfaceC50475.onActivitySaveInstanceStateByScionActivityInfo(C5379.m10967((Activity) this.f17959), (BinderC0669) this.f17960, this.f5363);
                break;
        }
    }
}
