导航菜单

页面标题

页面副标题

CashVia v1.6.02 - w1.java 源代码

正在查看: CashVia v1.6.02 应用的 w1.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package d1;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.pm.Signature;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import androidx.core.app.NotificationCompat;
import androidx.privacysandbox.ads.adservices.java.measurement.MeasurementManagerFutures;
import com.google.android.gms.internal.measurement.i4;
import com.google.android.gms.measurement.internal.zzae;
import com.google.android.gms.measurement.internal.zzbc;
import com.google.android.gms.measurement.internal.zzbd;
import com.google.android.gms.measurement.internal.zzno;
import java.io.ByteArrayInputStream;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.Random;
import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicLong;
import javax.security.auth.x500.X500Principal;

public final class w1 extends AbstractC0231o0 {
    public static final String[] u = {"firebase_", "google_", "ga_"};
    public static final String[] v = {"_err"};

    public SecureRandom f3799d;

    public final AtomicLong f3800e;

    public int f3801f;

    public MeasurementManagerFutures f3802g;

    public Boolean f3803i;

    public Integer f3804t;

    public w1(C0219i0 c0219i0) {
        super(c0219i0);
        this.f3804t = null;
        this.f3800e = new AtomicLong(0L);
    }

    public static MessageDigest B0() {
        MessageDigest messageDigest;
        for (int i2 = 0; i2 < 2; i2++) {
            try {
                messageDigest = MessageDigest.getInstance("MD5");
            } catch (NoSuchAlgorithmException unused) {
            }
            if (messageDigest != null) {
                return messageDigest;
            }
        }
        return null;
    }

    public static String C(int i2, String str, boolean z2) {
        if (str == null) {
            return null;
        }
        if (str.codePointCount(0, str.length()) <= i2) {
            return str;
        }
        if (z2) {
            return a3d20241011.M.e(str.substring(0, str.offsetByCodePoints(0, i2)), "...");
        }
        return null;
    }

    public static void D(Bundle bundle, int i2, String str, Object obj) {
        if (k0(i2, bundle)) {
            bundle.putString("_ev", C(40, str, true));
            if (obj != null) {
                if ((obj instanceof String) || (obj instanceof CharSequence)) {
                    bundle.putLong("_el", String.valueOf(obj).length());
                }
            }
        }
    }

    public static void O(Q0 q02, Bundle bundle, boolean z2) {
        if (bundle == null || q02 == null || (bundle.containsKey("_sc") && !z2)) {
            if (bundle != null && q02 == null && z2) {
                bundle.remove("_sn");
                bundle.remove("_sc");
                bundle.remove("_si");
                return;
            }
            return;
        }
        String str = q02.f3349a;
        if (str != null) {
            bundle.putString("_sn", str);
        } else {
            bundle.remove("_sn");
        }
        String str2 = q02.f3350b;
        if (str2 != null) {
            bundle.putString("_sc", str2);
        } else {
            bundle.remove("_sc");
        }
        bundle.putLong("_si", q02.f3351c);
    }

    public static void P(y1 y1Var, String str, int i2, String str2, String str3, int i3) {
        Bundle bundle = new Bundle();
        k0(i2, bundle);
        if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
            bundle.putString(str2, str3);
        }
        if (i2 == 6 || i2 == 7 || i2 == 2) {
            bundle.putLong("_el", i3);
        }
        y1Var.a(str, "_err", bundle);
    }

    public static boolean U(Context context) {
        ActivityInfo receiverInfo;
        J0.t.i(context);
        try {
            PackageManager packageManager = context.getPackageManager();
            if (packageManager != null && (receiverInfo = packageManager.getReceiverInfo(new ComponentName(context, "com.google.android.gms.measurement.AppMeasurementReceiver"), 0)) != null) {
                if (receiverInfo.enabled) {
                    return true;
                }
            }
        } catch (PackageManager.NameNotFoundException unused) {
        }
        return false;
    }

    public static boolean V(Intent intent) {
        String stringExtra = intent.getStringExtra("android.intent.extra.REFERRER_NAME");
        return "android-app://com.google.android.googlequicksearchbox/https/www.google.com".equals(stringExtra) || "https://www.google.com".equals(stringExtra) || "android-app://com.google.appcrawler".equals(stringExtra);
    }

    public static boolean W(Object obj) {
        return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
    }

    public static boolean a0(String str, String str2, String str3, String str4) {
        boolean isEmpty = TextUtils.isEmpty(str);
        boolean isEmpty2 = TextUtils.isEmpty(str2);
        if (!isEmpty && !isEmpty2) {
            J0.t.i(str);
            return !str.equals(str2);
        }
        if (isEmpty && isEmpty2) {
            return (TextUtils.isEmpty(str3) || TextUtils.isEmpty(str4)) ? !TextUtils.isEmpty(str4) : !str3.equals(str4);
        }
        if (isEmpty || !isEmpty2) {
            return TextUtils.isEmpty(str3) || !str3.equals(str4);
        }
        if (TextUtils.isEmpty(str4)) {
            return false;
        }
        return TextUtils.isEmpty(str3) || !str3.equals(str4);
    }

    public static boolean b0(String str, String[] strArr) {
        J0.t.i(strArr);
        for (String str2 : strArr) {
            if (Objects.equals(str, str2)) {
                return true;
            }
        }
        return false;
    }

    public static byte[] d0(Parcelable parcelable) {
        if (parcelable == null) {
            return null;
        }
        Parcel obtain = Parcel.obtain();
        try {
            parcelable.writeToParcel(obtain, 0);
            return obtain.marshall();
        } finally {
            obtain.recycle();
        }
    }

    public static boolean f0(Context context) {
        J0.t.i(context);
        return Build.VERSION.SDK_INT >= 24 ? o0(context, "com.google.android.gms.measurement.AppMeasurementJobService") : o0(context, "com.google.android.gms.measurement.AppMeasurementService");
    }

    public static ArrayList j0(List list) {
        if (list == null) {
            return new ArrayList(0);
        }
        ArrayList arrayList = new ArrayList(list.size());
        Iterator it = list.iterator();
        while (it.hasNext()) {
            zzae zzaeVar = (zzae) it.next();
            Bundle bundle = new Bundle();
            bundle.putString("app_id", zzaeVar.f3095a);
            bundle.putString("origin", zzaeVar.f3096b);
            bundle.putLong("creation_timestamp", zzaeVar.f3098d);
            bundle.putString("name", zzaeVar.f3097c.f3114b);
            Object a2 = zzaeVar.f3097c.a();
            J0.t.i(a2);
            AbstractC0242u0.e(bundle, a2);
            bundle.putBoolean("active", zzaeVar.f3099e);
            String str = zzaeVar.f3100f;
            if (str != null) {
                bundle.putString("trigger_event_name", str);
            }
            zzbd zzbdVar = zzaeVar.f3101g;
            if (zzbdVar != null) {
                bundle.putString("timed_out_event_name", zzbdVar.f3106a);
                zzbc zzbcVar = zzbdVar.f3107b;
                if (zzbcVar != null) {
                    bundle.putBundle("timed_out_event_params", zzbcVar.G());
                }
            }
            bundle.putLong("trigger_timeout", zzaeVar.f3102i);
            zzbd zzbdVar2 = zzaeVar.f3103t;
            if (zzbdVar2 != null) {
                bundle.putString("triggered_event_name", zzbdVar2.f3106a);
                zzbc zzbcVar2 = zzbdVar2.f3107b;
                if (zzbcVar2 != null) {
                    bundle.putBundle("triggered_event_params", zzbcVar2.G());
                }
            }
            bundle.putLong("triggered_timestamp", zzaeVar.f3097c.f3115c);
            bundle.putLong("time_to_live", zzaeVar.u);
            zzbd zzbdVar3 = zzaeVar.v;
            if (zzbdVar3 != null) {
                bundle.putString("expired_event_name", zzbdVar3.f3106a);
                zzbc zzbcVar3 = zzbdVar3.f3107b;
                if (zzbcVar3 != null) {
                    bundle.putBundle("expired_event_params", zzbcVar3.G());
                }
            }
            arrayList.add(bundle);
        }
        return arrayList;
    }

    public static boolean k0(int i2, Bundle bundle) {
        if (bundle == null || bundle.getLong("_err") != 0) {
            return false;
        }
        bundle.putLong("_err", i2);
        return true;
    }

    public static boolean o0(Context context, String str) {
        ServiceInfo serviceInfo;
        try {
            PackageManager packageManager = context.getPackageManager();
            if (packageManager != null && (serviceInfo = packageManager.getServiceInfo(new ComponentName(context, str), 0)) != null) {
                if (serviceInfo.enabled) {
                    return true;
                }
            }
        } catch (PackageManager.NameNotFoundException unused) {
        }
        return false;
    }

    public static boolean s0(String str) {
        String str2 = (String) r.f3717u0.a(null);
        return str2.equals("*") || Arrays.asList(str2.split(",")).contains(str);
    }

    public static long u(zzbc zzbcVar) {
        long j2 = 0;
        if (zzbcVar == null) {
            return 0L;
        }
        Bundle bundle = zzbcVar.f3105a;
        Iterator<String> it = bundle.keySet().iterator();
        while (it.hasNext()) {
            if (bundle.get(it.next()) instanceof Parcelable[]) {
                j2 += ((Parcelable[]) r3).length;
            }
        }
        return j2;
    }

    public static boolean u0(String str) {
        return !TextUtils.isEmpty(str) && str.startsWith("_");
    }

    public static long v(byte[] bArr) {
        J0.t.i(bArr);
        if (bArr.length <= 0) {
            throw new IllegalStateException();
        }
        int i2 = 0;
        long j2 = 0;
        for (int length = bArr.length - 1; length >= 0 && length >= bArr.length - 8; length--) {
            j2 += (bArr[length] & 255) << i2;
            i2 += 8;
        }
        return j2;
    }

    public static boolean w0(String str) {
        J0.t.e(str);
        return str.charAt(0) != '_' || str.equals("_ep");
    }

    public static int y0(String str) {
        if ("_ldl".equals(str)) {
            return 2048;
        }
        if ("_id".equals(str)) {
            return 256;
        }
        return "_lgclid".equals(str) ? 100 : 36;
    }

    public static Bundle z(List list) {
        Bundle bundle = new Bundle();
        if (list == null) {
            return bundle;
        }
        Iterator it = list.iterator();
        while (it.hasNext()) {
            zzno zznoVar = (zzno) it.next();
            String str = zznoVar.f3117e;
            String str2 = zznoVar.f3114b;
            if (str != null) {
                bundle.putString(str2, str);
            } else {
                Long l = zznoVar.f3116d;
                if (l != null) {
                    bundle.putLong(str2, l.longValue());
                } else {
                    Double d2 = zznoVar.f3119g;
                    if (d2 != null) {
                        bundle.putDouble(str2, d2.doubleValue());
                    }
                }
            }
        }
        return bundle;
    }

    public final zzbd A(String str, Bundle bundle, String str2, long j2, boolean z2) {
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        if (s(str) != 0) {
            c().f3219g.b(((C0219i0) this.f774b).f3552x.g(str), "Invalid conditional property event name");
            throw new IllegalArgumentException();
        }
        Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
        bundle2.putString("_o", str2);
        Bundle y2 = y(str, bundle2, Collections.singletonList("_o"), true);
        if (z2) {
            y2 = x(y2);
        }
        J0.t.i(y2);
        return new zzbd(str, new zzbc(y2), str2, j2);
    }

    public final String A0() {
        byte[] bArr = new byte[16];
        C0().nextBytes(bArr);
        return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
    }

    public final Object B(int i2, Object obj, boolean z2, boolean z3) {
        if (obj == null) {
            return null;
        }
        if ((obj instanceof Long) || (obj instanceof Double)) {
            return obj;
        }
        if (obj instanceof Integer) {
            return Long.valueOf(((Integer) obj).intValue());
        }
        if (obj instanceof Byte) {
            return Long.valueOf(((Byte) obj).byteValue());
        }
        if (obj instanceof Short) {
            return Long.valueOf(((Short) obj).shortValue());
        }
        if (obj instanceof Boolean) {
            return Long.valueOf(((Boolean) obj).booleanValue() ? 1L : 0L);
        }
        if (obj instanceof Float) {
            return Double.valueOf(((Float) obj).doubleValue());
        }
        if ((obj instanceof String) || (obj instanceof Character) || (obj instanceof CharSequence)) {
            return C(i2, String.valueOf(obj), z2);
        }
        if (!z3 || (!(obj instanceof Bundle[]) && !(obj instanceof Parcelable[]))) {
            return null;
        }
        ArrayList arrayList = new ArrayList();
        for (Parcelable parcelable : (Parcelable[]) obj) {
            if (parcelable instanceof Bundle) {
                Bundle x2 = x((Bundle) parcelable);
                if (!x2.isEmpty()) {
                    arrayList.add(x2);
                }
            }
        }
        return arrayList.toArray(new Bundle[arrayList.size()]);
    }

    public final SecureRandom C0() {
        n();
        if (this.f3799d == null) {
            this.f3799d = new SecureRandom();
        }
        return this.f3799d;
    }

    public final void E(Bundle bundle, long j2) {
        long j3 = bundle.getLong("_et");
        if (j3 != 0) {
            G c2 = c();
            c2.u.b(Long.valueOf(j3), "Params already contained engagement");
        }
        bundle.putLong("_et", j2 + j3);
    }

    public final void F(Bundle bundle, Bundle bundle2) {
        if (bundle2 == null) {
            return;
        }
        for (String str : bundle2.keySet()) {
            if (!bundle.containsKey(str)) {
                m().G(bundle, str, bundle2.get(str));
            }
        }
    }

    public final void G(Bundle bundle, String str, Object obj) {
        if (bundle == null) {
            return;
        }
        if (obj instanceof Long) {
            bundle.putLong(str, ((Long) obj).longValue());
            return;
        }
        if (obj instanceof String) {
            bundle.putString(str, String.valueOf(obj));
            return;
        }
        if (obj instanceof Double) {
            bundle.putDouble(str, ((Double) obj).doubleValue());
            return;
        }
        if (obj instanceof Bundle[]) {
            bundle.putParcelableArray(str, (Bundle[]) obj);
        } else if (str != null) {
            String simpleName = obj != null ? obj.getClass().getSimpleName() : null;
            c().f3222w.c(((C0219i0) this.f774b).f3552x.f(str), "Not putting event parameter. Invalid value type. name, type", simpleName);
        }
    }

    public final void H(com.google.android.gms.internal.measurement.W w2, int i2) {
        Bundle bundle = new Bundle();
        bundle.putInt("r", i2);
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning int value to wrapper");
        }
    }

    public final void I(com.google.android.gms.internal.measurement.W w2, long j2) {
        Bundle bundle = new Bundle();
        bundle.putLong("r", j2);
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning long value to wrapper");
        }
    }

    public final void J(com.google.android.gms.internal.measurement.W w2, Bundle bundle) {
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning bundle value to wrapper");
        }
    }

    public final void K(com.google.android.gms.internal.measurement.W w2, ArrayList arrayList) {
        Bundle bundle = new Bundle();
        bundle.putParcelableArrayList("r", arrayList);
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning bundle list to wrapper");
        }
    }

    public final void L(com.google.android.gms.internal.measurement.W w2, boolean z2) {
        Bundle bundle = new Bundle();
        bundle.putBoolean("r", z2);
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning boolean value to wrapper");
        }
    }

    public final void M(com.google.android.gms.internal.measurement.W w2, byte[] bArr) {
        Bundle bundle = new Bundle();
        bundle.putByteArray("r", bArr);
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning byte array to wrapper");
        }
    }

    public final void N(L l, int i2) {
        Iterator it = new TreeSet(l.f3299d.keySet()).iterator();
        int i3 = 0;
        while (it.hasNext()) {
            String str = (String) it.next();
            if (w0(str) && (i3 = i3 + 1) > i2) {
                String h2 = androidx.collection.a.h(i2, "Event can't contain more than ", " params");
                G c2 = c();
                C0219i0 c0219i0 = (C0219i0) this.f774b;
                String c3 = c0219i0.f3552x.c(l.f3296a);
                Bundle bundle = l.f3299d;
                c2.f3221t.c(c3, h2, c0219i0.f3552x.a(bundle));
                k0(5, bundle);
                bundle.remove(str);
            }
        }
    }

    public final void Q(String str, com.google.android.gms.internal.measurement.W w2) {
        Bundle bundle = new Bundle();
        bundle.putString("r", str);
        try {
            w2.g(bundle);
        } catch (RemoteException e2) {
            G g2 = ((C0219i0) this.f774b).f3550t;
            C0219i0.i(g2);
            g2.u.b(e2, "Error returning string value to wrapper");
        }
    }

    public final void R(java.lang.String r20, java.lang.String r21, android.os.Bundle r22, java.util.List r23, boolean r24) {
        throw new UnsupportedOperationException("Method not decompiled: d1.w1.R(java.lang.String, java.lang.String, android.os.Bundle, java.util.List, boolean):void");
    }

    public final void S(Parcelable[] parcelableArr, int i2, boolean z2) {
        J0.t.i(parcelableArr);
        for (Parcelable parcelable : parcelableArr) {
            Bundle bundle = (Bundle) parcelable;
            Iterator it = new TreeSet(bundle.keySet()).iterator();
            int i3 = 0;
            while (it.hasNext()) {
                String str = (String) it.next();
                if (w0(str) && !b0(str, AbstractC0242u0.f3778d) && (i3 = i3 + 1) > i2) {
                    C0219i0 c0219i0 = (C0219i0) this.f774b;
                    if (z2) {
                        c().f3221t.c(c0219i0.f3552x.f(str), androidx.collection.a.h(i2, "Param can't contain more than ", " item-scoped custom parameters"), c0219i0.f3552x.a(bundle));
                        k0(28, bundle);
                    } else {
                        c().f3221t.c(c0219i0.f3552x.f(str), "Param cannot contain item-scoped custom parameters", c0219i0.f3552x.a(bundle));
                        k0(23, bundle);
                    }
                    bundle.remove(str);
                }
            }
        }
    }

    public final boolean T(int i2, String str, String str2) {
        if (str2 == null) {
            c().f3221t.b(str, "Name is required and can't be null. Type");
            return false;
        }
        if (str2.codePointCount(0, str2.length()) <= i2) {
            return true;
        }
        G c2 = c();
        c2.f3221t.e("Name is too long. Type, maximum supported length, name", str, Integer.valueOf(i2), str2);
        return false;
    }

    public final boolean X(String str, double d2) {
        try {
            SharedPreferences.Editor edit = ((C0219i0) this.f774b).f3542a.getSharedPreferences("google.analytics.deferred.deeplink.prefs", 0).edit();
            edit.putString("deeplink", str);
            edit.putLong("timestamp", Double.doubleToRawLongBits(d2));
            return edit.commit();
        } catch (RuntimeException e2) {
            c().f3219g.b(e2, "Failed to persist Deferred Deep Link. exception");
            return false;
        }
    }

    public final boolean Y(String str, String str2) {
        boolean isEmpty = TextUtils.isEmpty(str);
        C0219i0 c0219i0 = (C0219i0) this.f774b;
        if (!isEmpty) {
            J0.t.i(str);
            if (str.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$")) {
                return true;
            }
            if (TextUtils.isEmpty(c0219i0.f3543b)) {
                G c2 = c();
                c2.f3221t.b(G.r(str), "Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id");
            }
            return false;
        }
        if (TextUtils.isEmpty(str2)) {
            if (TextUtils.isEmpty(c0219i0.f3543b)) {
                c().f3221t.d("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
            }
            return false;
        }
        J0.t.i(str2);
        if (str2.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$")) {
            return true;
        }
        G c3 = c();
        c3.f3221t.b(G.r(str2), "Invalid admob_app_id. Analytics disabled.");
        return false;
    }

    public final boolean Z(String str, String str2, int i2, Object obj) {
        if (obj != null && !(obj instanceof Long) && !(obj instanceof Float) && !(obj instanceof Integer) && !(obj instanceof Byte) && !(obj instanceof Short) && !(obj instanceof Boolean) && !(obj instanceof Double)) {
            if (!(obj instanceof String) && !(obj instanceof Character) && !(obj instanceof CharSequence)) {
                return false;
            }
            String valueOf = String.valueOf(obj);
            if (valueOf.codePointCount(0, valueOf.length()) > i2) {
                G c2 = c();
                c2.f3222w.e("Value is too long; discarded. Value kind, name, value length", str, str2, Integer.valueOf(valueOf.length()));
                return false;
            }
        }
        return true;
    }

    public final boolean c0(String str, String[] strArr, String[] strArr2, String str2) {
        if (str2 == null) {
            c().f3221t.b(str, "Name is required and can't be null. Type");
            return false;
        }
        String[] strArr3 = u;
        for (int i2 = 0; i2 < 3; i2++) {
            if (str2.startsWith(strArr3[i2])) {
                c().f3221t.c(str, "Name starts with reserved prefix. Type, name", str2);
                return false;
            }
        }
        if (strArr == null || !b0(str2, strArr)) {
            return true;
        }
        if (strArr2 != null && b0(str2, strArr2)) {
            return true;
        }
        c().f3221t.c(str, "Name is reserved. Type, name", str2);
        return false;
    }

    public final boolean e0(int i2) {
        Boolean bool = ((C0219i0) this.f774b).r().f3377f;
        if (t0() < i2 / 1000) {
            return (bool == null || bool.booleanValue()) ? false : true;
        }
        return true;
    }

    public final void g0() {
        n();
        SecureRandom secureRandom = new SecureRandom();
        long nextLong = secureRandom.nextLong();
        if (nextLong == 0) {
            nextLong = secureRandom.nextLong();
            if (nextLong == 0) {
                c().u.d("Utils falling back to Random for random id");
            }
        }
        this.f3800e.set(nextLong);
    }

    public final int h0(String str) {
        if (!m0("user property", str)) {
            return 6;
        }
        if (c0("user property", AbstractC0242u0.f3783i, null, str)) {
            return !T(24, "user property", str) ? 6 : 0;
        }
        return 15;
    }

    public final Object i0(Object obj, String str) {
        boolean equals = "_ev".equals(str);
        C0219i0 c0219i0 = (C0219i0) this.f774b;
        if (equals) {
            return B(Math.max(c0219i0.f3548g.p(null, false), 256), obj, true, true);
        }
        return B(u0(str) ? Math.max(c0219i0.f3548g.p(null, false), 256) : c0219i0.f3548g.p(null, false), obj, false, true);
    }

    public final boolean l0(Context context, String str) {
        Signature[] signatureArr;
        X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
        try {
            PackageInfo a2 = S0.c.a(context).a(64, str);
            if (a2 == null || (signatureArr = a2.signatures) == null || signatureArr.length <= 0) {
                return true;
            }
            return ((X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(signatureArr[0].toByteArray()))).getSubjectX500Principal().equals(x500Principal);
        } catch (PackageManager.NameNotFoundException e2) {
            c().f3219g.b(e2, "Package name not found");
            return true;
        } catch (CertificateException e3) {
            c().f3219g.b(e3, "Error obtaining certificate");
            return true;
        }
    }

    public final boolean m0(String str, String str2) {
        if (str2 == null) {
            c().f3221t.b(str, "Name is required and can't be null. Type");
            return false;
        }
        if (str2.length() == 0) {
            c().f3221t.b(str, "Name is required and can't be empty. Type");
            return false;
        }
        int codePointAt = str2.codePointAt(0);
        if (!Character.isLetter(codePointAt) && codePointAt != 95) {
            c().f3221t.c(str, "Name must start with a letter or _ (underscore). Type, name", str2);
            return false;
        }
        int length = str2.length();
        int charCount = Character.charCount(codePointAt);
        while (charCount < length) {
            int codePointAt2 = str2.codePointAt(charCount);
            if (codePointAt2 != 95 && !Character.isLetterOrDigit(codePointAt2)) {
                c().f3221t.c(str, "Name must consist of letters, digits or _ (underscores). Type, name", str2);
                return false;
            }
            charCount += Character.charCount(codePointAt2);
        }
        return true;
    }

    public final Object n0(Object obj, String str) {
        return "_ldl".equals(str) ? B(y0(str), obj, true, false) : B(y0(str), obj, false, false);
    }

    public final boolean p0(String str, String str2) {
        if (str2 == null) {
            c().f3221t.b(str, "Name is required and can't be null. Type");
            return false;
        }
        if (str2.length() == 0) {
            c().f3221t.b(str, "Name is required and can't be empty. Type");
            return false;
        }
        int codePointAt = str2.codePointAt(0);
        if (!Character.isLetter(codePointAt)) {
            c().f3221t.c(str, "Name must start with a letter. Type, name", str2);
            return false;
        }
        int length = str2.length();
        int charCount = Character.charCount(codePointAt);
        while (charCount < length) {
            int codePointAt2 = str2.codePointAt(charCount);
            if (codePointAt2 != 95 && !Character.isLetterOrDigit(codePointAt2)) {
                c().f3221t.c(str, "Name must consist of letters, digits or _ (underscores). Type, name", str2);
                return false;
            }
            charCount += Character.charCount(codePointAt2);
        }
        return true;
    }

    @Override
    public final boolean q() {
        return true;
    }

    public final boolean q0(String str, String str2) {
        i4.a();
        C0219i0 c0219i0 = (C0219i0) this.f774b;
        if (c0219i0.f3548g.y(null, r.f3716t0) && !TextUtils.isEmpty(str2)) {
            return true;
        }
        if (TextUtils.isEmpty(str)) {
            return false;
        }
        return c0219i0.f3548g.q("debug.firebase.analytics.app").equals(str);
    }

    public final int r(Object obj, String str) {
        return "_ldl".equals(str) ? Z("user property referrer", str, y0(str), obj) : Z("user property", str, y0(str), obj) ? 0 : 7;
    }

    public final boolean r0(String str) {
        n();
        if (S0.c.a(((C0219i0) this.f774b).f3542a).f942a.checkCallingOrSelfPermission(str) == 0) {
            return true;
        }
        c().f3224y.b(str, "Permission not granted");
        return false;
    }

    public final int s(String str) {
        if (!m0(NotificationCompat.CATEGORY_EVENT, str)) {
            return 2;
        }
        if (c0(NotificationCompat.CATEGORY_EVENT, AbstractC0242u0.f3779e, AbstractC0242u0.f3780f, str)) {
            return !T(40, NotificationCompat.CATEGORY_EVENT, str) ? 2 : 0;
        }
        return 13;
    }

    public final int t(java.lang.String r13, java.lang.String r14, java.lang.Object r15, android.os.Bundle r16, java.util.List r17, boolean r18, boolean r19) {
        throw new UnsupportedOperationException("Method not decompiled: d1.w1.t(java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
    }

    public final int t0() {
        if (this.f3804t == null) {
            F0.f fVar = F0.f.f297b;
            Context context = ((C0219i0) this.f774b).f3542a;
            fVar.getClass();
            int i2 = F0.h.f302e;
            int i3 = 0;
            try {
                i3 = context.getPackageManager().getPackageInfo("com.google.android.gms", 0).versionCode;
            } catch (PackageManager.NameNotFoundException unused) {
                Log.w("GooglePlayServicesUtil", "Google Play services is missing.");
            }
            this.f3804t = Integer.valueOf(i3 / 1000);
        }
        return this.f3804t.intValue();
    }

    public final long v0() {
        throw new UnsupportedOperationException("Method not decompiled: d1.w1.v0():long");
    }

    public final Bundle w(Uri uri, boolean z2) {
        String str;
        String str2;
        String str3;
        String str4;
        String str5;
        String str6;
        String str7;
        String str8;
        String str9;
        String str10;
        if (uri == null) {
            return null;
        }
        try {
            if (uri.isHierarchical()) {
                str = uri.getQueryParameter("utm_campaign");
                str2 = uri.getQueryParameter("utm_source");
                str3 = uri.getQueryParameter("utm_medium");
                str4 = uri.getQueryParameter("gclid");
                str5 = z2 ? uri.getQueryParameter("gbraid") : null;
                str6 = uri.getQueryParameter("utm_id");
                str7 = uri.getQueryParameter("dclid");
                str8 = uri.getQueryParameter("srsltid");
                str9 = uri.getQueryParameter("sfmc_id");
            } else {
                str = null;
                str2 = null;
                str3 = null;
                str4 = null;
                str5 = null;
                str6 = null;
                str7 = null;
                str8 = null;
                str9 = null;
            }
            if (TextUtils.isEmpty(str) && TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3) && TextUtils.isEmpty(str4) && ((!z2 || TextUtils.isEmpty(str5)) && TextUtils.isEmpty(str6) && TextUtils.isEmpty(str7) && TextUtils.isEmpty(str8) && TextUtils.isEmpty(str9))) {
                return null;
            }
            Bundle bundle = new Bundle();
            if (TextUtils.isEmpty(str)) {
                str10 = "sfmc_id";
            } else {
                str10 = "sfmc_id";
                bundle.putString("campaign", str);
            }
            if (!TextUtils.isEmpty(str2)) {
                bundle.putString("source", str2);
            }
            if (!TextUtils.isEmpty(str3)) {
                bundle.putString("medium", str3);
            }
            if (!TextUtils.isEmpty(str4)) {
                bundle.putString("gclid", str4);
            }
            if (z2 && !TextUtils.isEmpty(str5)) {
                bundle.putString("gbraid", str5);
            }
            String queryParameter = uri.getQueryParameter("gad_source");
            if (z2 && !TextUtils.isEmpty(queryParameter)) {
                bundle.putString("gad_source", queryParameter);
            }
            String queryParameter2 = uri.getQueryParameter("utm_term");
            if (!TextUtils.isEmpty(queryParameter2)) {
                bundle.putString("term", queryParameter2);
            }
            String queryParameter3 = uri.getQueryParameter("utm_content");
            if (!TextUtils.isEmpty(queryParameter3)) {
                bundle.putString("content", queryParameter3);
            }
            String queryParameter4 = uri.getQueryParameter("aclid");
            if (!TextUtils.isEmpty(queryParameter4)) {
                bundle.putString("aclid", queryParameter4);
            }
            String queryParameter5 = uri.getQueryParameter("cp1");
            if (!TextUtils.isEmpty(queryParameter5)) {
                bundle.putString("cp1", queryParameter5);
            }
            String queryParameter6 = uri.getQueryParameter("anid");
            if (!TextUtils.isEmpty(queryParameter6)) {
                bundle.putString("anid", queryParameter6);
            }
            if (!TextUtils.isEmpty(str6)) {
                bundle.putString("campaign_id", str6);
            }
            if (!TextUtils.isEmpty(str7)) {
                bundle.putString("dclid", str7);
            }
            String queryParameter7 = uri.getQueryParameter("utm_source_platform");
            if (!TextUtils.isEmpty(queryParameter7)) {
                bundle.putString("source_platform", queryParameter7);
            }
            String queryParameter8 = uri.getQueryParameter("utm_creative_format");
            if (!TextUtils.isEmpty(queryParameter8)) {
                bundle.putString("creative_format", queryParameter8);
            }
            String queryParameter9 = uri.getQueryParameter("utm_marketing_tactic");
            if (!TextUtils.isEmpty(queryParameter9)) {
                bundle.putString("marketing_tactic", queryParameter9);
            }
            if (!TextUtils.isEmpty(str8)) {
                bundle.putString("srsltid", str8);
            }
            if (!TextUtils.isEmpty(str9)) {
                bundle.putString(str10, str9);
            }
            return bundle;
        } catch (UnsupportedOperationException e2) {
            c().u.b(e2, "Install referrer url isn't a hierarchical URI");
            return null;
        }
    }

    public final Bundle x(Bundle bundle) {
        Bundle bundle2 = new Bundle();
        if (bundle != null) {
            for (String str : bundle.keySet()) {
                Object i02 = i0(bundle.get(str), str);
                if (i02 == null) {
                    G c2 = c();
                    c2.f3222w.b(((C0219i0) this.f774b).f3552x.f(str), "Param value can't be null");
                } else {
                    G(bundle2, str, i02);
                }
            }
        }
        return bundle2;
    }

    public final boolean x0(String str) {
        List<ResolveInfo> queryIntentActivities;
        return (TextUtils.isEmpty(str) || (queryIntentActivities = ((C0219i0) this.f774b).f3542a.getPackageManager().queryIntentActivities(new Intent("android.intent.action.VIEW", Uri.parse(str)), 0)) == null || queryIntentActivities.isEmpty()) ? false : true;
    }

    public final android.os.Bundle y(java.lang.String r20, android.os.Bundle r21, java.util.List r22, boolean r23) {
        throw new UnsupportedOperationException("Method not decompiled: d1.w1.y(java.lang.String, android.os.Bundle, java.util.List, boolean):android.os.Bundle");
    }

    public final long z0() {
        long andIncrement;
        long j2;
        if (this.f3800e.get() != 0) {
            synchronized (this.f3800e) {
                this.f3800e.compareAndSet(-1L, 1L);
                andIncrement = this.f3800e.getAndIncrement();
            }
            return andIncrement;
        }
        synchronized (this.f3800e) {
            long nanoTime = System.nanoTime();
            ((C0219i0) this.f774b).f3553y.getClass();
            long nextLong = new Random(nanoTime ^ System.currentTimeMillis()).nextLong();
            int i2 = this.f3801f + 1;
            this.f3801f = i2;
            j2 = nextLong + i2;
        }
        return j2;
    }
}