package p138.p176.p291.p292.p293;

import android.content.Context;
import android.os.Bundle;
import com.google.android.gms.measurement.AppMeasurement;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import p000.p001.p002.p003.p004.C0567;
import p138.p176.p291.C5557;
import p138.p176.p291.C5559;
import p138.p176.p291.p292.p293.InterfaceC5566;
import p138.p176.p291.p292.p293.p294.C5572;
import p138.p176.p291.p292.p293.p294.C5573;
import p138.p176.p291.p292.p293.p294.C5574;
import p138.p176.p291.p318.InterfaceC5899;

/* JADX INFO: renamed from: ދ.ހ.ށ.ނ.֏.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C5569 implements InterfaceC5566 {

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public static volatile InterfaceC5566 f15994;

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final AppMeasurement f15995;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final Map<String, Object> f15996;

    /* JADX INFO: renamed from: ދ.ހ.ށ.ނ.֏.ؠ$֏, reason: contains not printable characters */
    public class C5570 implements InterfaceC5566.InterfaceC5567 {
        public C5570(C5569 c5569, String str) {
        }
    }

    public C5569(AppMeasurement appMeasurement) {
        C0567.m1910(appMeasurement);
        this.f15995 = appMeasurement;
        this.f15996 = new ConcurrentHashMap();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static InterfaceC5566 m8938(C5559 c5559, Context context, InterfaceC5899 interfaceC5899) {
        C0567.m1910(c5559);
        C0567.m1910(context);
        C0567.m1910(interfaceC5899);
        C0567.m1910(context.getApplicationContext());
        if (f15994 == null) {
            synchronized (C5569.class) {
                if (f15994 == null) {
                    Bundle bundle = new Bundle(1);
                    if (c5559.m8932()) {
                        interfaceC5899.mo8961(C5557.class, ExecutorC5578.f16012, C5577.f16011);
                        bundle.putBoolean("dataCollectionDefaultEnabled", c5559.m8931());
                    }
                    f15994 = new C5569(AppMeasurement.m1409(context, bundle));
                }
            }
        }
        return f15994;
    }

    @Override // p138.p176.p291.p292.p293.InterfaceC5566
    /* JADX INFO: renamed from: ֏ */
    public InterfaceC5566.InterfaceC5567 mo8936(String str, InterfaceC5566.InterfaceC5568 interfaceC5568) {
        C0567.m1910(interfaceC5568);
        if (!C5573.m8940(str)) {
            return null;
        }
        if ((str.isEmpty() || !this.f15996.containsKey(str) || this.f15996.get(str) == null) ? false : true) {
            return null;
        }
        AppMeasurement appMeasurement = this.f15995;
        Object c5572 = "fiam".equals(str) ? new C5572(appMeasurement, interfaceC5568) : ("crash".equals(str) || "clx".equals(str)) ? new C5574(appMeasurement, interfaceC5568) : null;
        if (c5572 == null) {
            return null;
        }
        this.f15996.put(str, c5572);
        return new C5570(this, str);
    }

    @Override // p138.p176.p291.p292.p293.InterfaceC5566
    /* JADX INFO: renamed from: ֏ */
    public void mo8937(String str, String str2, Bundle bundle) {
        boolean z;
        if (bundle == null) {
            bundle = new Bundle();
        }
        if (C5573.m8940(str)) {
            boolean z2 = true;
            if (C5573.f16003.contains(str2)) {
                z = false;
                break;
            }
            Iterator<String> it = C5573.f16005.iterator();
            while (it.hasNext()) {
                if (bundle.containsKey(it.next())) {
                    z = false;
                    break;
                }
            }
            z = true;
            if (z) {
                if ("_cmp".equals(str2)) {
                    if (C5573.m8940(str)) {
                        Iterator<String> it2 = C5573.f16005.iterator();
                        while (true) {
                            if (!it2.hasNext()) {
                                byte b = -1;
                                int iHashCode = str.hashCode();
                                if (iHashCode != 101200) {
                                    if (iHashCode != 101230) {
                                        if (iHashCode == 3142703 && str.equals("fiam")) {
                                            b = 2;
                                        }
                                    } else if (str.equals("fdl")) {
                                        b = 1;
                                    }
                                } else if (str.equals("fcm")) {
                                    b = 0;
                                }
                                if (b == 0) {
                                    bundle.putString("_cis", "fcm_integration");
                                } else if (b == 1) {
                                    bundle.putString("_cis", "fdl_integration");
                                } else if (b != 2) {
                                    break;
                                } else {
                                    bundle.putString("_cis", "fiam_integration");
                                }
                            } else if (bundle.containsKey(it2.next())) {
                                break;
                            }
                        }
                        z2 = false;
                    } else {
                        z2 = false;
                    }
                }
                if (z2) {
                    if ("clx".equals(str) && "_ae".equals(str2)) {
                        bundle.putLong("_r", 1L);
                    }
                    this.f15995.logEventInternal(str, str2, bundle);
                }
            }
        }
    }
}
