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;

/* renamed from: ᵷˎᵳ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4881 extends AbstractRunnableC3593 {

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public final /* synthetic */ Object f18184;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public final /* synthetic */ Object f18185;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public final /* synthetic */ Object f18186;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final /* synthetic */ int f18187 = 4;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4881(C1166 c1166, Activity activity, BinderC0209 binderC0209) {
        super((C1555) c1166.f4956, true);
        this.f18184 = activity;
        this.f18185 = binderC0209;
        this.f18186 = c1166;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4881(C1166 c1166, Bundle bundle, Activity activity) {
        super((C1555) c1166.f4956, true);
        this.f18184 = bundle;
        this.f18185 = activity;
        this.f18186 = c1166;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4881(C1555 c1555, Context context, Bundle bundle) {
        super(c1555, true);
        this.f18184 = context;
        this.f18185 = bundle;
        this.f18186 = c1555;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4881(C1555 c1555, String str, String str2) {
        super(c1555, true);
        this.f18184 = str;
        this.f18185 = str2;
        Objects.requireNonNull(c1555);
        this.f18186 = c1555;
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C4881(C1555 c1555, String str, BinderC0209 binderC0209) {
        super(c1555, true);
        this.f18184 = str;
        this.f18185 = binderC0209;
        Objects.requireNonNull(c1555);
        this.f18186 = c1555;
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // defpackage.AbstractRunnableC3593
    /* renamed from: ᵥᵯˎ */
    public final void mo4482() {
        Boolean boolValueOf;
        Bundle bundle = null;
        InterfaceC3393 interfaceC3393AsInterface = null;
        switch (this.f18187) {
            case 0:
                InterfaceC3393 interfaceC3393 = ((C1555) this.f18186).f6199;
                ᵩʛʽ.ᵝᵵᵺ(interfaceC3393);
                interfaceC3393.setUserProperty(null, (String) this.f18184, new BinderC1399((String) this.f18185), false, this.f13416);
                break;
            case 1:
                try {
                    Context context = (Context) this.f18184;
                    ᵩʛʽ.ᵝᵵᵺ(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) {
                        }
                    }
                    C1555 c1555 = (C1555) this.f18186;
                    Object[] objArr = boolValueOf == null || !boolValueOf.booleanValue();
                    c1555.getClass();
                    try {
                        interfaceC3393AsInterface = AbstractBinderC4605.asInterface(C0979.m3340(context, objArr != false ? C0979.f4352 : C0979.f4356, "com.google.android.gms.measurement.dynamite").m3344("com.google.android.gms.measurement.internal.AppMeasurementDynamiteService"));
                    } catch (DynamiteModule$LoadingException e) {
                        c1555.m4516(e, true, false);
                    }
                    c1555.f6199 = interfaceC3393AsInterface;
                    if (c1555.f6199 != null) {
                        int iM3341 = C0979.m3341(context, "com.google.android.gms.measurement.dynamite");
                        int iM3343 = C0979.m3343(context, "com.google.android.gms.measurement.dynamite", false);
                        int iMax = Math.max(iM3341, iM3343);
                        boolean z = Boolean.TRUE.equals(boolValueOf) || iM3343 < iM3341;
                        long j = iMax;
                        c1555.f6198 = j;
                        C1622 c1622 = new C1622(161000L, j, z, (Bundle) this.f18185, ᵳʿˉ.ᵡᵘˎʽ(context));
                        Object[] objArr2 = c1555.f6198 >= 169;
                        InterfaceC3393 interfaceC33932 = c1555.f6199;
                        if (objArr2 != true) {
                            ᵩʛʽ.ᵝᵵᵺ(interfaceC33932);
                            interfaceC33932.initialize(new BinderC1399(context), c1622, this.f13416);
                            break;
                        } else {
                            ᵩʛʽ.ᵝᵵᵺ(interfaceC33932);
                            interfaceC33932.initializeWithElapsedTime(new BinderC1399(context), c1622, this.f13416, this.f13415);
                            break;
                        }
                    } else {
                        break;
                    }
                } catch (Exception e2) {
                    ((C1555) this.f18186).m4516(e2, true, false);
                    return;
                }
                break;
            case 2:
                InterfaceC3393 interfaceC33933 = ((C1555) this.f18186).f6199;
                ᵩʛʽ.ᵝᵵᵺ(interfaceC33933);
                interfaceC33933.getMaxUserProperties((String) this.f18184, (BinderC0209) this.f18185);
                break;
            case 3:
                Bundle bundle2 = (Bundle) this.f18184;
                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);
                        }
                    }
                }
                InterfaceC3393 interfaceC33934 = ((C1555) ((C1166) this.f18186).f4956).f6199;
                ᵩʛʽ.ᵝᵵᵺ(interfaceC33934);
                interfaceC33934.onActivityCreatedByScionActivityInfo(C5491.m11121((Activity) this.f18185), bundle, this.f13415);
                break;
            default:
                InterfaceC3393 interfaceC33935 = ((C1555) ((C1166) this.f18186).f4956).f6199;
                ᵩʛʽ.ᵝᵵᵺ(interfaceC33935);
                interfaceC33935.onActivitySaveInstanceStateByScionActivityInfo(C5491.m11121((Activity) this.f18184), (BinderC0209) this.f18185, this.f13415);
                break;
        }
    }

    @Override // defpackage.AbstractRunnableC3593
    /* renamed from: ᵴᵳ */
    public void mo4483() {
        switch (this.f18187) {
            case 2:
                ((BinderC0209) this.f18185).mo1487(null);
                break;
        }
    }
}
