package o;

import android.os.Bundle;
import com.google.android.gms.common.internal.Preconditions;
import java.util.concurrent.ConcurrentHashMap;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class B2 implements A2 {
    public static volatile B2 c;
    public final OD a;
    public final ConcurrentHashMap b;

    public B2(OD od) {
        Preconditions.checkNotNull(od);
        this.a = od;
        this.b = new ConcurrentHashMap();
    }

    public final void a(String str, String str2, Bundle bundle) {
        if (AbstractC1327gp0.c.contains(str) || AbstractC1327gp0.b.contains(str2)) {
            return;
        }
        H10 h10 = AbstractC1327gp0.d;
        int i = h10.f140o;
        int i2 = 0;
        int i3 = 0;
        while (i3 < i) {
            boolean zContainsKey = bundle.containsKey((String) h10.get(i3));
            i3++;
            if (zContainsKey) {
                return;
            }
        }
        if ("_cmp".equals(str2)) {
            if (AbstractC1327gp0.c.contains(str)) {
                return;
            }
            H10 h102 = AbstractC1327gp0.d;
            int i4 = h102.f140o;
            while (i2 < i4) {
                boolean zContainsKey2 = bundle.containsKey((String) h102.get(i2));
                i2++;
                if (zContainsKey2) {
                    return;
                }
            }
            int iHashCode = str.hashCode();
            if (iHashCode != 101200) {
                if (iHashCode != 101230) {
                    if (iHashCode != 3142703 || !str.equals("fiam")) {
                        return;
                    } else {
                        bundle.putString("_cis", "fiam_integration");
                    }
                } else if (!str.equals("fdl")) {
                    return;
                } else {
                    bundle.putString("_cis", "fdl_integration");
                }
            } else if (!str.equals("fcm")) {
                return;
            } else {
                bundle.putString("_cis", "fcm_integration");
            }
        }
        if ("clx".equals(str) && "_ae".equals(str2)) {
            bundle.putLong("_r", 1L);
        }
        Wp0 wp0 = (Wp0) this.a.m;
        wp0.a(new Gp0(wp0, str, str2, bundle, 1));
    }

    public final C0669Zu b(String str, Gm0 gm0) {
        Preconditions.checkNotNull(gm0);
        if (!AbstractC1327gp0.c.contains(str)) {
            boolean zIsEmpty = str.isEmpty();
            ConcurrentHashMap concurrentHashMap = this.b;
            if (zIsEmpty || !concurrentHashMap.containsKey(str) || concurrentHashMap.get(str) == null) {
                boolean zEquals = "fiam".equals(str);
                OD od = this.a;
                Object c1390hY = zEquals ? new C1390hY(od, gm0) : "clx".equals(str) ? new C1696kj0(od, gm0) : null;
                if (c1390hY != null) {
                    concurrentHashMap.put(str, c1390hY);
                    return new C0669Zu(28);
                }
            }
        }
        return null;
    }
}
