正在查看: Perplexity v2.48.1 应用的 E1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Perplexity v2.48.1 应用的 E1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package jd;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
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 com.mapbox.maps.plugin.scalebar.ScaleBarConstantKt;
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;
import kotlin.jvm.internal.Intrinsics;
public final class E1 extends AbstractC0571n0 {
public static final String[] s0 = {"firebase_", "google_", "ga_"};
public static final String[] t0 = {"_err"};
public int X;
public l9.d Y;
public Boolean Z;
public Integer r0;
public SecureRandom y;
public final AtomicLong z;
public E1(C0556g0 c0556g0) {
super(c0556g0);
this.r0 = null;
this.z = new AtomicLong(0L);
}
public static boolean B1(String str) {
return !TextUtils.isEmpty(str) && str.startsWith("_");
}
public static boolean C1(String str) {
Ic.D.e(str);
return str.charAt(0) != '_' || str.equals("_ep");
}
public static boolean D1(Context context) {
ActivityInfo receiverInfo;
Ic.D.h(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 E1(Context context) {
ServiceInfo serviceInfo;
try {
PackageManager packageManager = context.getPackageManager();
if (packageManager != null && (serviceInfo = packageManager.getServiceInfo(new ComponentName(context, "com.google.android.gms.measurement.AppMeasurementJobService"), 0)) != null) {
if (serviceInfo.enabled) {
return true;
}
}
} catch (PackageManager.NameNotFoundException unused) {
}
return false;
}
public static byte[] H1(Parcelable parcelable) {
if (parcelable == null) {
return null;
}
Parcel obtain = Parcel.obtain();
try {
parcelable.writeToParcel(obtain, 0);
return obtain.marshall();
} finally {
obtain.recycle();
}
}
public static final boolean I1(int i, Bundle bundle) {
if (bundle == null || bundle.getLong("_err") != 0) {
return false;
}
bundle.putLong("_err", i);
return true;
}
public static long Q1(byte[] bArr) {
Ic.D.h(bArr);
int length = bArr.length;
if (length <= 0) {
throw new IllegalStateException();
}
int i = 0;
long j = 0;
for (int i2 = length - 1; i2 >= 0 && i2 >= bArr.length - 8; i2--) {
j += (bArr[i2] & 255) << i;
i += 8;
}
return j;
}
public static String R0(String str, int i, boolean z) {
if (str != null) {
if (str.codePointCount(0, str.length()) <= i) {
return str;
}
if (z) {
return String.valueOf(str.substring(0, str.offsetByCodePoints(0, i))).concat("...");
}
}
return null;
}
public static MessageDigest S0() {
MessageDigest messageDigest;
for (int i = 0; i < 2; i++) {
try {
messageDigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException unused) {
}
if (messageDigest != null) {
return messageDigest;
}
}
return null;
}
public static ArrayList U0(List list) {
if (list == null) {
return new ArrayList(0);
}
ArrayList arrayList = new ArrayList(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
C0552f c0552f = (C0552f) it.next();
Bundle bundle = new Bundle();
bundle.putString("app_id", c0552f.w);
bundle.putString("origin", c0552f.x);
bundle.putLong("creation_timestamp", c0552f.z);
bundle.putString("name", c0552f.y.x);
Object f = c0552f.y.f();
Ic.D.h(f);
AbstractC0582t0.e(bundle, f);
bundle.putBoolean("active", c0552f.X);
String str = c0552f.Y;
if (str != null) {
bundle.putString("trigger_event_name", str);
}
C0581t c0581t = c0552f.Z;
if (c0581t != null) {
bundle.putString("timed_out_event_name", c0581t.w);
C0579s c0579s = c0581t.x;
if (c0579s != null) {
bundle.putBundle("timed_out_event_params", c0579s.f());
}
}
bundle.putLong("trigger_timeout", c0552f.r0);
C0581t c0581t2 = c0552f.s0;
if (c0581t2 != null) {
bundle.putString("triggered_event_name", c0581t2.w);
C0579s c0579s2 = c0581t2.x;
if (c0579s2 != null) {
bundle.putBundle("triggered_event_params", c0579s2.f());
}
}
bundle.putLong("triggered_timestamp", c0552f.y.y);
bundle.putLong("time_to_live", c0552f.t0);
C0581t c0581t3 = c0552f.u0;
if (c0581t3 != null) {
bundle.putString("expired_event_name", c0581t3.w);
C0579s c0579s3 = c0581t3.x;
if (c0579s3 != null) {
bundle.putBundle("expired_event_params", c0579s3.f());
}
}
arrayList.add(bundle);
}
return arrayList;
}
public static void X0(P0 p0, Bundle bundle, boolean z) {
if (bundle != null && p0 != null) {
if (!bundle.containsKey("_sc") || z) {
String str = p0.a;
if (str != null) {
bundle.putString("_sn", str);
} else {
bundle.remove("_sn");
}
String str2 = p0.b;
if (str2 != null) {
bundle.putString("_sc", str2);
} else {
bundle.remove("_sc");
}
bundle.putLong("_si", p0.c);
return;
}
z = false;
}
if (bundle != null && p0 == null && z) {
bundle.remove("_sn");
bundle.remove("_sc");
bundle.remove("_si");
}
}
public static void b1(f9.v vVar, String str, int i, String str2, String str3, int i2) {
Bundle bundle = new Bundle();
I1(i, bundle);
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
bundle.putString(str2, str3);
}
if (i == 6 || i == 7 || i == 2) {
bundle.putLong("_el", i2);
}
vVar.B(str, "_err", bundle);
}
public static boolean n1(String str, String[] strArr) {
Ic.D.h(strArr);
for (String str2 : strArr) {
if (Objects.equals(str, str2)) {
return true;
}
}
return false;
}
public static boolean p1(String str) {
String str2 = (String) A.q0.a(null);
return str2.equals("*") || Arrays.asList(str2.split(",")).contains(str);
}
public static boolean y1(Object obj) {
return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
}
public final boolean A1(int i) {
Boolean bool = ((C0556g0) ((A8.e) this).w).m().X;
if (O1() < i / ScaleBarConstantKt.KILOMETER) {
return (bool == null || bool.booleanValue()) ? false : true;
}
return true;
}
public final boolean F1(java.lang.String r5, java.lang.String r6, java.lang.String r7, java.lang.String r8) {
throw new UnsupportedOperationException("Method not decompiled: jd.E1.F1(java.lang.String, java.lang.String, java.lang.String, java.lang.String):boolean");
}
public final boolean G1(String str) {
Ic.D.h(str);
return str.matches(true != ((C0556g0) ((A8.e) this).w).Z.U0(null, A.p1) ? "^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$" : "^1:\\d+:android:[a-f0-9]+$");
}
@Override
public final boolean I0() {
return true;
}
public final int J1(Object obj, String str) {
return "_ldl".equals(str) ? t1("user property referrer", str, l1(str), obj) : t1("user property", str, l1(str), obj) ? 0 : 7;
}
public final int K1(String str) {
if (!u1("event", str)) {
return 2;
}
if (!s1("event", AbstractC0582t0.a, AbstractC0582t0.b, str)) {
return 13;
}
((C0556g0) ((A8.e) this).w).getClass();
return !r1(40, "event", str) ? 2 : 0;
}
public final Bundle L0(String str, Bundle bundle, List list, boolean z) {
int M1;
List list2 = list;
boolean n1 = n1(str, AbstractC0582t0.d);
if (bundle == null) {
return null;
}
Bundle bundle2 = new Bundle(bundle);
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
E1 e1 = ((C0556g0) ((A8.e) c0556g0.Z).w).v0;
C0556g0.d(e1);
int i = e1.A1(201500000) ? 100 : 25;
Iterator it = new TreeSet(bundle.keySet()).iterator();
int i2 = 0;
boolean z2 = false;
while (it.hasNext()) {
String str2 = (String) it.next();
if (list2 == null || !list2.contains(str2)) {
M1 = !z ? M1(str2) : 0;
if (M1 == 0) {
M1 = L1(str2);
}
} else {
M1 = 0;
}
if (M1 != 0) {
W0(bundle2, M1, str2, M1 == 3 ? str2 : null);
bundle2.remove(str2);
} else {
int k1 = k1(str, str2, bundle.get(str2), bundle2, list2, z, n1);
if (k1 == 17) {
W0(bundle2, 17, str2, Boolean.FALSE);
} else if (k1 != 0 && !"_ev".equals(str2)) {
W0(bundle2, k1, k1 == 21 ? str : str2, bundle.get(str2));
bundle2.remove(str2);
}
if (C1(str2) && (i2 = i2 + 1) > i) {
if (!c0556g0.Z.U0(null, A.r1) || !z2) {
String f = u2.a.f(i, "Event can't contain more than ", " params");
P p = c0556g0.s0;
C0556g0.f(p);
K k = c0556g0.w0;
p.r0.d(k.d(str), k.b(bundle), f);
}
I1(5, bundle2);
bundle2.remove(str2);
z2 = true;
}
}
list2 = list;
}
return bundle2;
}
public final int L1(String str) {
if (!u1("event param", str)) {
return 3;
}
if (!s1("event param", null, null, str)) {
return 14;
}
((C0556g0) ((A8.e) this).w).getClass();
return !r1(40, "event param", str) ? 3 : 0;
}
public final l9.d M0() {
m9.b bVar;
Object obj;
if (this.Y == null) {
Context context = ((C0556g0) ((A8.e) this).w).w;
Intrinsics.h(context, "context");
StringBuilder sb = new StringBuilder("AdServicesInfo.version=");
int i = Build.VERSION.SDK_INT;
j9.b bVar2 = j9.b.a;
sb.append(i >= 33 ? bVar2.a() : 0);
Log.d("MeasurementManager", sb.toString());
if ((i >= 33 ? bVar2.a() : 0) >= 5) {
Object systemService = context.getSystemService((Class<Object>) m9.c.d());
Intrinsics.g(systemService, "context.getSystemService…ementManager::class.java)");
bVar = new m9.b(m9.c.a(systemService));
} else {
j9.a aVar = j9.a.a;
if (((i == 31 || i == 32) ? aVar.a() : 0) >= 9) {
try {
obj = new i9.p(context, 1).invoke(context);
} catch (NoClassDefFoundError unused) {
StringBuilder sb2 = new StringBuilder("Unable to find adservices code, check manifest for uses-library tag, versionS=");
int i2 = Build.VERSION.SDK_INT;
sb2.append((i2 == 31 || i2 == 32) ? aVar.a() : 0);
Log.d("MeasurementManager", sb2.toString());
obj = null;
}
bVar = (m9.e) obj;
} else {
bVar = null;
}
}
this.Y = bVar != null ? new l9.d(bVar) : null;
}
return this.Y;
}
public final int M1(String str) {
if (!v1("event param", str)) {
return 3;
}
if (!s1("event param", null, null, str)) {
return 14;
}
((C0556g0) ((A8.e) this).w).getClass();
return !r1(40, "event param", str) ? 3 : 0;
}
public final C0581t N0(String str, Bundle bundle, String str2, long j, boolean z) {
if (TextUtils.isEmpty(str)) {
return null;
}
if (K1(str) != 0) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
P p = c0556g0.s0;
C0556g0.f(p);
p.Y.c(c0556g0.w0.f(str), "Invalid conditional property event name");
throw new IllegalArgumentException();
}
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
bundle2.putString("_o", str2);
Bundle L0 = L0(str, bundle2, Collections.singletonList("_o"), true);
if (z) {
L0 = T1(L0);
}
Ic.D.h(L0);
return new C0581t(str, new C0579s(L0), str2, j);
}
public final int N1(String str) {
if (!u1("user property", str)) {
return 6;
}
if (!s1("user property", AbstractC0582t0.i, null, str)) {
return 15;
}
((C0556g0) ((A8.e) this).w).getClass();
return !r1(24, "user property", str) ? 6 : 0;
}
public final Object O0(Object obj, String str) {
boolean equals = "_ev".equals(str);
int i = 500;
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (equals) {
c0556g0.Z.getClass();
return m1(Math.max(500, 256), obj, true, true);
}
if (B1(str)) {
c0556g0.Z.getClass();
i = Math.max(500, 256);
} else {
c0556g0.Z.getClass();
}
return m1(i, obj, false, true);
}
public final int O1() {
if (this.r0 == null) {
this.r0 = Integer.valueOf(com.google.android.gms.common.e.getInstance().getApkVersion(((C0556g0) ((A8.e) this).w).w) / ScaleBarConstantKt.KILOMETER);
}
return this.r0.intValue();
}
public final Object P0(Object obj, String str) {
return "_ldl".equals(str) ? m1(l1(str), obj, true, false) : m1(l1(str), obj, false, false);
}
public final long P1() {
throw new UnsupportedOperationException("Method not decompiled: jd.E1.P1():long");
}
public final String Q0() {
byte[] bArr = new byte[16];
T0().nextBytes(bArr);
return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
}
public final long R1() {
long andIncrement;
long j;
AtomicLong atomicLong = this.z;
if (atomicLong.get() != 0) {
AtomicLong atomicLong2 = this.z;
synchronized (atomicLong2) {
atomicLong2.compareAndSet(-1L, 1L);
andIncrement = atomicLong2.getAndIncrement();
}
return andIncrement;
}
synchronized (atomicLong) {
long nanoTime = System.nanoTime();
((C0556g0) ((A8.e) this).w).x0.getClass();
long nextLong = new Random(nanoTime ^ System.currentTimeMillis()).nextLong();
int i = this.X + 1;
this.X = i;
j = nextLong + i;
}
return j;
}
public final Bundle S1(Uri uri) {
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 = uri.getQueryParameter("gbraid");
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) && 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 (!TextUtils.isEmpty(str5)) {
bundle.putString("gbraid", str5);
}
String queryParameter = uri.getQueryParameter("gad_source");
if (!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 e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Install referrer url isn't a hierarchical URI");
return null;
}
}
public final SecureRandom T0() {
H0();
if (this.y == null) {
this.y = new SecureRandom();
}
return this.y;
}
public final Bundle T1(Bundle bundle) {
Bundle bundle2 = new Bundle();
if (bundle != null) {
for (String str : bundle.keySet()) {
Object O0 = O0(bundle.get(str), str);
if (O0 == null) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
P p = c0556g0.s0;
C0556g0.f(p);
p.u0.c(c0556g0.w0.e(str), "Param value can't be null");
} else {
c1(bundle2, str, O0);
}
}
}
return bundle2;
}
public final void V0(Bundle bundle, long j) {
long j2 = bundle.getLong("_et");
if (j2 != 0) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(Long.valueOf(j2), "Params already contained engagement");
} else {
j2 = 0;
}
bundle.putLong("_et", j + j2);
}
public final void W0(Bundle bundle, int i, String str, Object obj) {
if (I1(i, bundle)) {
((C0556g0) ((A8.e) this).w).getClass();
bundle.putString("_ev", R0(str, 40, true));
if (obj != null) {
if ((obj instanceof String) || (obj instanceof CharSequence)) {
bundle.putLong("_el", obj.toString().length());
}
}
}
}
public final void Y0(Bundle bundle, Bundle bundle2) {
if (bundle2 == null) {
return;
}
for (String str : bundle2.keySet()) {
if (!bundle.containsKey(str)) {
E1 e1 = ((C0556g0) ((A8.e) this).w).v0;
C0556g0.d(e1);
e1.c1(bundle, str, bundle2.get(str));
}
}
}
public final void Z0(Parcelable[] parcelableArr, int i) {
Ic.D.h(parcelableArr);
for (Parcelable parcelable : parcelableArr) {
Bundle bundle = (Bundle) parcelable;
Iterator it = new TreeSet(bundle.keySet()).iterator();
int i2 = 0;
boolean z = false;
while (it.hasNext()) {
String str = (String) it.next();
if (C1(str) && !n1(str, AbstractC0582t0.h) && (i2 = i2 + 1) > i) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (!c0556g0.Z.U0(null, A.r1) || !z) {
P p = c0556g0.s0;
C0556g0.f(p);
K k = c0556g0.w0;
p.r0.d(k.e(str), k.b(bundle), "Param can't contain more than " + i + " item-scoped custom parameters");
}
I1(28, bundle);
bundle.remove(str);
z = true;
}
}
}
}
public final void a1(c4.u uVar, int i) {
Bundle bundle = (Bundle) uVar.X;
Iterator it = new TreeSet(bundle.keySet()).iterator();
int i2 = 0;
boolean z = false;
while (it.hasNext()) {
String str = (String) it.next();
if (C1(str) && (i2 = i2 + 1) > i) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (!c0556g0.Z.U0(null, A.r1) || !z) {
String f = u2.a.f(i, "Event can't contain more than ", " params");
P p = c0556g0.s0;
C0556g0.f(p);
K k = c0556g0.w0;
p.r0.d(k.d((String) uVar.y), k.b(bundle), f);
I1(5, bundle);
}
bundle.remove(str);
z = true;
}
}
}
public final void c1(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);
return;
}
if (str != null) {
String simpleName = obj != null ? obj.getClass().getSimpleName() : null;
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
P p = c0556g0.s0;
C0556g0.f(p);
p.u0.d(c0556g0.w0.e(str), simpleName, "Not putting event parameter. Invalid value type. name, type");
}
}
public final void d1(com.google.android.gms.internal.measurement.L l, boolean z) {
Bundle bundle = new Bundle();
bundle.putBoolean("r", z);
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning boolean value to wrapper");
}
}
public final void e1(com.google.android.gms.internal.measurement.L l, ArrayList arrayList) {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("r", arrayList);
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning bundle list to wrapper");
}
}
public final void f1(com.google.android.gms.internal.measurement.L l, Bundle bundle) {
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning bundle value to wrapper");
}
}
public final void g1(com.google.android.gms.internal.measurement.L l, byte[] bArr) {
Bundle bundle = new Bundle();
bundle.putByteArray("r", bArr);
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning byte array to wrapper");
}
}
public final void h1(com.google.android.gms.internal.measurement.L l, int i) {
Bundle bundle = new Bundle();
bundle.putInt("r", i);
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning int value to wrapper");
}
}
public final void i1(com.google.android.gms.internal.measurement.L l, long j) {
Bundle bundle = new Bundle();
bundle.putLong("r", j);
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning long value to wrapper");
}
}
public final void j1(String str, com.google.android.gms.internal.measurement.L l) {
Bundle bundle = new Bundle();
bundle.putString("r", str);
try {
l.b0(bundle);
} catch (RemoteException e) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.s0.c(e, "Error returning string value to wrapper");
}
}
public final int k1(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: jd.E1.k1(java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
}
public final int l1(String str) {
boolean equals = "_ldl".equals(str);
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (equals) {
c0556g0.getClass();
return 2048;
}
if ("_id".equals(str)) {
c0556g0.getClass();
return 256;
}
if ("_lgclid".equals(str)) {
c0556g0.getClass();
return 100;
}
c0556g0.getClass();
return 36;
}
public final Object m1(int i, Object obj, boolean z, boolean z2) {
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(true != ((Boolean) obj).booleanValue() ? 0L : 1L);
}
if (obj instanceof Float) {
return Double.valueOf(((Float) obj).doubleValue());
}
if ((obj instanceof String) || (obj instanceof Character) || (obj instanceof CharSequence)) {
return R0(obj.toString(), i, z);
}
if (!z2) {
return null;
}
if (!(obj instanceof Bundle[]) && !(obj instanceof Parcelable[])) {
return null;
}
ArrayList arrayList = new ArrayList();
for (Parcelable parcelable : (Parcelable[]) obj) {
if (parcelable instanceof Bundle) {
Bundle T1 = T1((Bundle) parcelable);
if (!T1.isEmpty()) {
arrayList.add(T1);
}
}
}
return arrayList.toArray(new Bundle[arrayList.size()]);
}
public final void o1(String str, String str2, Bundle bundle, List list, boolean z) {
int M1;
P p;
String str3;
int k1;
List list2 = list;
if (bundle == null) {
return;
}
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
E1 e1 = ((C0556g0) ((A8.e) c0556g0.Z).w).v0;
C0556g0.d(e1);
int i = true != e1.A1(231100000) ? 0 : 35;
Iterator it = new TreeSet(bundle.keySet()).iterator();
int i2 = 0;
boolean z2 = false;
while (it.hasNext()) {
String str4 = (String) it.next();
if (list2 == null || !list2.contains(str4)) {
M1 = !z ? M1(str4) : 0;
if (M1 == 0) {
M1 = L1(str4);
}
} else {
M1 = 0;
}
if (M1 != 0) {
W0(bundle, M1, str4, M1 == 3 ? str4 : null);
bundle.remove(str4);
} else {
boolean y1 = y1(bundle.get(str4));
P p2 = c0556g0.s0;
if (y1) {
C0556g0.f(p2);
p2.u0.e("Nested Bundle parameters are not allowed; discarded. event name, param name, child param name", str, str2, str4);
k1 = 22;
p = p2;
str3 = null;
} else {
p = p2;
str3 = null;
k1 = k1(str, str4, bundle.get(str4), bundle, list2, z, false);
}
if (k1 != 0 && !"_ev".equals(str4)) {
W0(bundle, k1, str4, bundle.get(str4));
bundle.remove(str4);
} else if (C1(str4) && !n1(str4, AbstractC0582t0.h)) {
i2++;
boolean A1 = A1(231100000);
K k = c0556g0.w0;
if (A1) {
P p3 = p;
if (i2 > i) {
if (!c0556g0.Z.U0(str3, A.r1) || !z2) {
C0556g0.f(p3);
p3.r0.d(k.d(str), k.b(bundle), "Item can't contain more than " + i + " item-scoped custom params");
}
I1(28, bundle);
bundle.remove(str4);
list2 = list;
z2 = true;
}
} else {
C0556g0.f(p);
p.r0.d(k.d(str), k.b(bundle), "Item array not supported on client's version of Google Play Services (Android Only)");
I1(23, bundle);
bundle.remove(str4);
}
}
}
list2 = list;
}
}
public final boolean q1(String str, String str2) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
boolean U0 = c0556g0.Z.U0(null, A.p1);
String str3 = c0556g0.x;
P p = c0556g0.s0;
if (U0) {
if (TextUtils.isEmpty(str)) {
if (TextUtils.isEmpty(str3)) {
C0556g0.f(p);
p.r0.b("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
return false;
}
} else {
if (G1(str)) {
return true;
}
if (TextUtils.isEmpty(str3)) {
C0556g0.f(p);
p.r0.c(P.P0(str), "Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id");
return false;
}
}
} else if (TextUtils.isEmpty(str)) {
if (!TextUtils.isEmpty(str2)) {
if (G1(str2)) {
return true;
}
C0556g0.f(p);
p.r0.c(P.P0(str2), "Invalid admob_app_id. Analytics disabled.");
return false;
}
if (TextUtils.isEmpty(str3)) {
C0556g0.f(p);
p.r0.b("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
}
} else {
if (G1(str)) {
return true;
}
if (TextUtils.isEmpty(str3)) {
C0556g0.f(p);
p.r0.c(P.P0(str), "Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id");
return false;
}
}
return false;
}
public final boolean r1(int i, String str, String str2) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (str2 == null) {
P p = c0556g0.s0;
C0556g0.f(p);
p.r0.c(str, "Name is required and can't be null. Type");
return false;
}
if (str2.codePointCount(0, str2.length()) <= i) {
return true;
}
P p2 = c0556g0.s0;
C0556g0.f(p2);
p2.r0.e("Name is too long. Type, maximum supported length, name", str, Integer.valueOf(i), str2);
return false;
}
public final boolean s1(String str, String[] strArr, String[] strArr2, String str2) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (str2 == null) {
P p = c0556g0.s0;
C0556g0.f(p);
p.r0.c(str, "Name is required and can't be null. Type");
return false;
}
String[] strArr3 = s0;
for (int i = 0; i < 3; i++) {
if (str2.startsWith(strArr3[i])) {
P p2 = c0556g0.s0;
C0556g0.f(p2);
p2.r0.d(str, str2, "Name starts with reserved prefix. Type, name");
return false;
}
}
if (strArr == null || !n1(str2, strArr)) {
return true;
}
if (strArr2 != null && n1(str2, strArr2)) {
return true;
}
P p3 = c0556g0.s0;
C0556g0.f(p3);
p3.r0.d(str, str2, "Name is reserved. Type, name");
return false;
}
public final boolean t1(String str, String str2, int i, 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)) {
return true;
}
if (!(obj instanceof String) && !(obj instanceof Character) && !(obj instanceof CharSequence)) {
return false;
}
String obj2 = obj.toString();
if (obj2.codePointCount(0, obj2.length()) > i) {
P p = ((C0556g0) ((A8.e) this).w).s0;
C0556g0.f(p);
p.u0.e("Value is too long; discarded. Value kind, name, value length", str, str2, Integer.valueOf(obj2.length()));
return false;
}
return true;
}
public final boolean u1(String str, String str2) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (str2 == null) {
P p = c0556g0.s0;
C0556g0.f(p);
p.r0.c(str, "Name is required and can't be null. Type");
return false;
}
if (str2.length() == 0) {
P p2 = c0556g0.s0;
C0556g0.f(p2);
p2.r0.c(str, "Name is required and can't be empty. Type");
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
if (codePointAt != 95) {
P p3 = c0556g0.s0;
C0556g0.f(p3);
p3.r0.d(str, str2, "Name must start with a letter or _ (underscore). Type, name");
return false;
}
codePointAt = 95;
}
int length = str2.length();
int charCount = Character.charCount(codePointAt);
while (charCount < length) {
int codePointAt2 = str2.codePointAt(charCount);
if (codePointAt2 != 95 && !Character.isLetterOrDigit(codePointAt2)) {
P p4 = c0556g0.s0;
C0556g0.f(p4);
p4.r0.d(str, str2, "Name must consist of letters, digits or _ (underscores). Type, name");
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final boolean v1(String str, String str2) {
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (str2 == null) {
P p = c0556g0.s0;
C0556g0.f(p);
p.r0.c(str, "Name is required and can't be null. Type");
return false;
}
if (str2.length() == 0) {
P p2 = c0556g0.s0;
C0556g0.f(p2);
p2.r0.c(str, "Name is required and can't be empty. Type");
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
P p3 = c0556g0.s0;
C0556g0.f(p3);
p3.r0.d(str, str2, "Name must start with a letter. Type, name");
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)) {
P p4 = c0556g0.s0;
C0556g0.f(p4);
p4.r0.d(str, str2, "Name must consist of letters, digits or _ (underscores). Type, name");
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final boolean w1(String str) {
H0();
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
if (Pc.b.a(c0556g0.w).x.checkCallingOrSelfPermission(str) == 0) {
return true;
}
P p = c0556g0.s0;
C0556g0.f(p);
p.w0.c(str, "Permission not granted");
return false;
}
public final boolean x1(String str, String str2) {
if (!TextUtils.isEmpty(str2)) {
return true;
}
if (TextUtils.isEmpty(str)) {
return false;
}
return ((C0556g0) ((A8.e) this).w).Z.L0("debug.firebase.analytics.app").equals(str);
}
public final boolean z1(Context context, String str) {
Signature[] signatureArr;
C0556g0 c0556g0 = (C0556g0) ((A8.e) this).w;
X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
try {
PackageInfo g = Pc.b.a(context).g(64, str);
if (g == null || (signatureArr = g.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 e) {
P p = c0556g0.s0;
C0556g0.f(p);
p.Y.c(e, "Package name not found");
return true;
} catch (CertificateException e2) {
P p2 = c0556g0.s0;
C0556g0.f(p2);
p2.Y.c(e2, "Error obtaining certificate");
return true;
}
}
}