正在查看: Bhakti v5.4.0 应用的 V1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Bhakti v5.4.0 应用的 V1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package Sa;
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.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 androidx.credentials.playservices.controllers.BeginSignIn.CredentialProviderBeginSignInController$;
import com.google.android.gms.internal.ads.zzbbn;
import com.google.android.gms.internal.measurement.zzdq;
import j$.util.Objects;
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.Random;
import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicLong;
import javax.security.auth.x500.X500Principal;
public final class V1 extends AbstractC0190w0 {
public static final String[] j = {"firebase_", "google_", "ga_"};
public static final String[] k = {"_err"};
public SecureRandom d;
public final AtomicLong e;
public int f;
public G4.h g;
public Boolean h;
public Integer i;
public V1(C0164n0 c0164n0) {
super(c0164n0);
this.i = null;
this.e = new AtomicLong(0L);
}
public static byte[] A2(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 C2(Context context) {
L8.o0.l(context);
return Build.VERSION.SDK_INT >= 24 ? H2(context, "com.google.android.gms.measurement.AppMeasurementJobService") : H2(context, "com.google.android.gms.measurement.AppMeasurementService");
}
public static ArrayList F2(List list) {
if (list == null) {
return new ArrayList(0);
}
ArrayList arrayList = new ArrayList(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
C0143g c0143g = (C0143g) it.next();
Bundle bundle = new Bundle();
bundle.putString("app_id", c0143g.a);
bundle.putString("origin", c0143g.b);
bundle.putLong("creation_timestamp", c0143g.d);
bundle.putString("name", c0143g.c.b);
Object K0 = c0143g.c.K0();
L8.o0.l(K0);
B0.j(bundle, K0);
bundle.putBoolean("active", c0143g.e);
String str = c0143g.f;
if (str != null) {
bundle.putString("trigger_event_name", str);
}
C0198z c0198z = c0143g.g;
if (c0198z != null) {
bundle.putString("timed_out_event_name", c0198z.a);
C0195y c0195y = c0198z.b;
if (c0195y != null) {
bundle.putBundle("timed_out_event_params", c0195y.L0());
}
}
bundle.putLong("trigger_timeout", c0143g.h);
C0198z c0198z2 = c0143g.i;
if (c0198z2 != null) {
bundle.putString("triggered_event_name", c0198z2.a);
C0195y c0195y2 = c0198z2.b;
if (c0195y2 != null) {
bundle.putBundle("triggered_event_params", c0195y2.L0());
}
}
bundle.putLong("triggered_timestamp", c0143g.c.c);
bundle.putLong("time_to_live", c0143g.j);
C0198z c0198z3 = c0143g.k;
if (c0198z3 != null) {
bundle.putString("expired_event_name", c0198z3.a);
C0195y c0195y3 = c0198z3.b;
if (c0195y3 != null) {
bundle.putBundle("expired_event_params", c0195y3.L0());
}
}
arrayList.add(bundle);
}
return arrayList;
}
public static boolean G2(int i, Bundle bundle) {
if (bundle == null || bundle.getLong("_err") != 0) {
return false;
}
bundle.putLong("_err", i);
return true;
}
public static boolean H2(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 M2(String str) {
String str2 = (String) A.q0.a(null);
return str2.equals("*") || Arrays.asList(str2.split(",")).contains(str);
}
public static boolean P2(String str) {
return !TextUtils.isEmpty(str) && str.startsWith("_");
}
public static long R1(C0195y c0195y) {
long j2 = 0;
if (c0195y == null) {
return 0L;
}
Bundle bundle = c0195y.a;
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 R2(String str) {
L8.o0.i(str);
return str.charAt(0) != '_' || str.equals("_ep");
}
public static long S1(byte[] bArr) {
L8.o0.l(bArr);
int i = 0;
L8.o0.p(bArr.length > 0);
long j2 = 0;
for (int length = bArr.length - 1; length >= 0 && length >= bArr.length - 8; length--) {
j2 += (bArr[length] & 255) << i;
i += 8;
}
return j2;
}
public static int S2(String str) {
if ("_ldl".equals(str)) {
return 2048;
}
if ("_id".equals(str)) {
return 256;
}
return "_lgclid".equals(str) ? 100 : 36;
}
public static MessageDigest W2() {
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 Bundle X1(List list) {
Bundle bundle = new Bundle();
if (list == null) {
return bundle;
}
Iterator it = list.iterator();
while (it.hasNext()) {
Q1 q1 = (Q1) it.next();
String str = q1.e;
String str2 = q1.b;
if (str != null) {
bundle.putString(str2, str);
} else {
Long l = q1.d;
if (l != null) {
bundle.putLong(str2, l.longValue());
} else {
Double d = q1.g;
if (d != null) {
bundle.putDouble(str2, d.doubleValue());
}
}
}
}
return bundle;
}
public static String Z1(String str, int i, boolean z) {
if (str == null) {
return null;
}
if (str.codePointCount(0, str.length()) <= i) {
return str;
}
if (z) {
return j.e.e(str.substring(0, str.offsetByCodePoints(0, i)), "...");
}
return null;
}
public static void b2(C0130b1 c0130b1, Bundle bundle, boolean z) {
if (bundle == null || c0130b1 == null || (bundle.containsKey("_sc") && !z)) {
if (bundle != null && c0130b1 == null && z) {
bundle.remove("_sn");
bundle.remove("_sc");
bundle.remove("_si");
return;
}
return;
}
String str = c0130b1.a;
if (str != null) {
bundle.putString("_sn", str);
} else {
bundle.remove("_sn");
}
String str2 = c0130b1.b;
if (str2 != null) {
bundle.putString("_sc", str2);
} else {
bundle.remove("_sc");
}
bundle.putLong("_si", c0130b1.c);
}
public static void c2(U1 u1, String str, int i, String str2, String str3, int i2) {
Bundle bundle = new Bundle();
G2(i, bundle);
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
bundle.putString(str2, str3);
}
if (i == 6 || i == 7 || i == 2) {
bundle.putLong("_el", i2);
}
u1.a(str, "_err", bundle);
}
public static void d2(Bundle bundle, int i, String str, Object obj) {
if (G2(i, bundle)) {
bundle.putString("_ev", Z1(str, 40, true));
if (obj != null) {
if ((obj instanceof String) || (obj instanceof CharSequence)) {
bundle.putLong("_el", String.valueOf(obj).length());
}
}
}
}
public static boolean t2(Context context) {
ActivityInfo receiverInfo;
L8.o0.l(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 u2(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 v2(Object obj) {
return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
}
public static boolean x2(String str, String str2, String str3, String str4) {
boolean isEmpty = TextUtils.isEmpty(str);
boolean isEmpty2 = TextUtils.isEmpty(str2);
if (!isEmpty && !isEmpty2) {
L8.o0.l(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 y2(String str, String[] strArr) {
L8.o0.l(strArr);
for (String str2 : strArr) {
if (Objects.equals(str, str2)) {
return true;
}
}
return false;
}
public final boolean B2(int i) {
Boolean bool = ((C0164n0) ((Cp.c) this).b).n().f;
if (Q2() < i / zzbbn.zzq.zzf) {
return (bool == null || bool.booleanValue()) ? false : true;
}
return true;
}
public final int D2(String str) {
if (!I2("user property", str)) {
return 6;
}
if (z2("user property", B0.i, null, str)) {
return !s2(24, "user property", str) ? 6 : 0;
}
return 15;
}
public final Object E2(Object obj, String str) {
boolean equals = "_ev".equals(str);
int i = 500;
C0164n0 c0164n0 = (C0164n0) ((Cp.c) this).b;
if (equals) {
c0164n0.g.getClass();
return Y1(Math.max(500, 256), obj, true, true);
}
if (P2(str)) {
c0164n0.g.getClass();
i = Math.max(500, 256);
} else {
c0164n0.g.getClass();
}
return Y1(i, obj, false, true);
}
public final boolean I2(String str, String str2) {
if (str2 == null) {
zzj().i.h("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
zzj().i.h("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt) && codePointAt != 95) {
zzj().i.f(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)) {
zzj().i.f(str, "Name must consist of letters, digits or _ (underscores). Type, name", str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final Object J2(Object obj, String str) {
return "_ldl".equals(str) ? Y1(S2(str), obj, true, false) : Y1(S2(str), obj, false, false);
}
public final boolean K2(Context context, String str) {
Signature[] signatureArr;
X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
try {
PackageInfo d = Ca.c.a(context).d(64, str);
if (d == null || (signatureArr = d.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) {
zzj().g.h("Package name not found", e);
return true;
} catch (CertificateException e2) {
zzj().g.h("Error obtaining certificate", e2);
return true;
}
}
public final boolean L2(String str, String str2) {
if (str2 == null) {
zzj().i.h("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
zzj().i.h("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
zzj().i.f(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)) {
zzj().i.f(str, "Name must consist of letters, digits or _ (underscores). Type, name", str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
@Override
public final boolean N1() {
return true;
}
public final boolean N2(String str, String str2) {
if (!TextUtils.isEmpty(str2)) {
return true;
}
if (TextUtils.isEmpty(str)) {
return false;
}
return ((C0164n0) ((Cp.c) this).b).g.M1("debug.firebase.analytics.app").equals(str);
}
public final int O1(Object obj, String str) {
return "_ldl".equals(str) ? r2(S2(str), obj, "user property referrer", str) : r2(S2(str), obj, "user property", str) ? 0 : 7;
}
public final boolean O2(String str) {
K1();
if (Ca.c.a(((C0164n0) ((Cp.c) this).b).a).a.checkCallingOrSelfPermission(str) == 0) {
return true;
}
zzj().v.h("Permission not granted", str);
return false;
}
public final int P1(String str) {
if (!I2("event", str)) {
return 2;
}
if (z2("event", B0.e, B0.f, str)) {
return !s2(40, "event", str) ? 2 : 0;
}
return 13;
}
public final int Q1(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: Sa.V1.Q1(java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
}
public final int Q2() {
if (this.i == null) {
sa.f fVar = sa.f.b;
Context context = ((C0164n0) ((Cp.c) this).b).a;
fVar.getClass();
this.i = Integer.valueOf(sa.f.a(context) / zzbbn.zzq.zzf);
}
return this.i.intValue();
}
public final C0198z T1(String str, Bundle bundle, String str2, long j2, boolean z) {
if (TextUtils.isEmpty(str)) {
return null;
}
if (P1(str) != 0) {
zzj().g.h("Invalid conditional property event name", ((C0164n0) ((Cp.c) this).b).r.g(str));
throw new IllegalArgumentException();
}
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
bundle2.putString("_o", str2);
Bundle W1 = W1(str, bundle2, Collections.singletonList("_o"), true);
if (z) {
W1 = V1(W1);
}
L8.o0.l(W1);
return new C0198z(str, new C0195y(W1), str2, j2);
}
public final long T2() {
throw new UnsupportedOperationException("Method not decompiled: Sa.V1.T2():long");
}
public final Bundle U1(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) {
zzj().j.h("Install referrer url isn't a hierarchical URI", e);
return null;
}
}
public final long U2() {
long andIncrement;
long j2;
if (this.e.get() != 0) {
synchronized (this.e) {
this.e.compareAndSet(-1L, 1L);
andIncrement = this.e.getAndIncrement();
}
return andIncrement;
}
synchronized (this.e) {
long nanoTime = System.nanoTime();
((C0164n0) ((Cp.c) this).b).v.getClass();
long nextLong = new Random(nanoTime ^ System.currentTimeMillis()).nextLong();
int i = this.f + 1;
this.f = i;
j2 = nextLong + i;
}
return j2;
}
public final Bundle V1(Bundle bundle) {
Bundle bundle2 = new Bundle();
if (bundle != null) {
for (String str : bundle.keySet()) {
Object E2 = E2(bundle.get(str), str);
if (E2 == null) {
V zzj = zzj();
zzj.p.h("Param value can't be null", ((C0164n0) ((Cp.c) this).b).r.f(str));
} else {
g2(bundle2, str, E2);
}
}
}
return bundle2;
}
public final String V2() {
byte[] bArr = new byte[16];
X2().nextBytes(bArr);
return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
}
public final android.os.Bundle W1(java.lang.String r20, android.os.Bundle r21, java.util.List r22, boolean r23) {
throw new UnsupportedOperationException("Method not decompiled: Sa.V1.W1(java.lang.String, android.os.Bundle, java.util.List, boolean):android.os.Bundle");
}
public final SecureRandom X2() {
K1();
if (this.d == null) {
this.d = new SecureRandom();
}
return this.d;
}
public final Object Y1(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(((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 Z1(String.valueOf(obj), i, z);
}
if (!z2 || (!(obj instanceof Bundle[]) && !(obj instanceof Parcelable[]))) {
return null;
}
ArrayList arrayList = new ArrayList();
for (Parcelable parcelable : (Parcelable[]) obj) {
if (parcelable instanceof Bundle) {
Bundle V1 = V1((Bundle) parcelable);
if (!V1.isEmpty()) {
arrayList.add(V1);
}
}
}
return arrayList.toArray(new Bundle[arrayList.size()]);
}
public final void a2(L8.N n, int i) {
Iterator it = new TreeSet(((Bundle) n.e).keySet()).iterator();
int i2 = 0;
while (it.hasNext()) {
String str = (String) it.next();
if (R2(str) && (i2 = i2 + 1) > i) {
String b = Ai.o.b(i, "Event can't contain more than ", " params");
V zzj = zzj();
C0164n0 c0164n0 = (C0164n0) ((Cp.c) this).b;
String c = c0164n0.r.c((String) n.b);
Bundle bundle = (Bundle) n.e;
zzj.i.f(c, b, c0164n0.r.b(bundle));
G2(5, bundle);
bundle.remove(str);
}
}
}
public final void e2(Bundle bundle, long j2) {
long j3 = bundle.getLong("_et");
if (j3 != 0) {
V zzj = zzj();
zzj.j.h("Params already contained engagement", Long.valueOf(j3));
}
bundle.putLong("_et", j2 + j3);
}
public final void f2(Bundle bundle, Bundle bundle2) {
if (bundle2 == null) {
return;
}
for (String str : bundle2.keySet()) {
if (!bundle.containsKey(str)) {
J1().g2(bundle, str, bundle2.get(str));
}
}
}
public final void g2(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;
zzj().p.f(((C0164n0) ((Cp.c) this).b).r.f(str), "Not putting event parameter. Invalid value type. name, type", simpleName);
}
}
public final void h2(zzdq zzdqVar, int i) {
Bundle bundle = new Bundle();
bundle.putInt("r", i);
try {
zzdqVar.zza(bundle);
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning int value to wrapper", e);
}
}
public final void i2(zzdq zzdqVar, long j2) {
Bundle bundle = new Bundle();
bundle.putLong("r", j2);
try {
zzdqVar.zza(bundle);
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning long value to wrapper", e);
}
}
public final void j2(zzdq zzdqVar, Bundle bundle) {
try {
zzdqVar.zza(bundle);
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning bundle value to wrapper", e);
}
}
public final void k2(zzdq zzdqVar, ArrayList arrayList) {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("r", arrayList);
try {
zzdqVar.zza(bundle);
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning bundle list to wrapper", e);
}
}
public final void l2(zzdq zzdqVar, boolean z) {
Bundle bundle = new Bundle();
bundle.putBoolean("r", z);
try {
zzdqVar.zza(bundle);
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning boolean value to wrapper", e);
}
}
public final void m2(zzdq zzdqVar, byte[] bArr) {
Bundle bundle = new Bundle();
bundle.putByteArray("r", bArr);
try {
zzdqVar.zza(bundle);
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning byte array to wrapper", e);
}
}
public final void n2(String str, double d) {
C0164n0 c0164n0 = (C0164n0) ((Cp.c) this).b;
if (TextUtils.isEmpty(str)) {
return;
}
boolean z = false;
try {
SharedPreferences.Editor edit = c0164n0.a.getSharedPreferences("google.analytics.deferred.deeplink.prefs", 0).edit();
edit.putString("deeplink", str);
edit.putLong("timestamp", Double.doubleToRawLongBits(d));
z = edit.commit();
} catch (RuntimeException e) {
zzj().g.h("Failed to persist Deferred Deep Link. exception", e);
}
if (z) {
Intent intent = new Intent("android.google.analytics.action.DEEPLINK_ACTION");
Context context = c0164n0.a;
if (Build.VERSION.SDK_INT < 34) {
context.sendBroadcast(intent);
} else {
B0.x.n(context, intent, B0.x.i(B0.x.f(B0.x.e())));
}
}
}
public final void o2(String str, zzdq zzdqVar) {
try {
zzdqVar.zza(CredentialProviderBeginSignInController$.ExternalSyntheticOutline0.m("r", str));
} catch (RemoteException e) {
V v = ((C0164n0) ((Cp.c) this).b).i;
C0164n0.e(v);
v.j.h("Error returning string value to wrapper", e);
}
}
public final void p2(java.lang.String r20, java.lang.String r21, android.os.Bundle r22, java.util.List r23, boolean r24) {
throw new UnsupportedOperationException("Method not decompiled: Sa.V1.p2(java.lang.String, java.lang.String, android.os.Bundle, java.util.List, boolean):void");
}
public final void q2(Parcelable[] parcelableArr, int i) {
L8.o0.l(parcelableArr);
for (Parcelable parcelable : parcelableArr) {
Bundle bundle = (Bundle) parcelable;
Iterator it = new TreeSet(bundle.keySet()).iterator();
int i2 = 0;
while (it.hasNext()) {
String str = (String) it.next();
if (R2(str) && !y2(str, B0.d) && (i2 = i2 + 1) > i) {
V zzj = zzj();
String b = Ai.o.b(i, "Param can't contain more than ", " item-scoped custom parameters");
C0164n0 c0164n0 = (C0164n0) ((Cp.c) this).b;
zzj.i.f(c0164n0.r.f(str), b, c0164n0.r.b(bundle));
G2(28, bundle);
bundle.remove(str);
}
}
}
}
public final boolean r2(int i, Object obj, String str, String str2) {
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()) > i) {
V zzj = zzj();
zzj.p.e(str, str2, Integer.valueOf(valueOf.length()), "Value is too long; discarded. Value kind, name, value length");
return false;
}
}
return true;
}
public final boolean s2(int i, String str, String str2) {
if (str2 == null) {
zzj().i.h("Name is required and can't be null. Type", str);
return false;
}
if (str2.codePointCount(0, str2.length()) <= i) {
return true;
}
V zzj = zzj();
zzj.i.e(str, Integer.valueOf(i), str2, "Name is too long. Type, maximum supported length, name");
return false;
}
public final boolean w2(String str, String str2) {
boolean isEmpty = TextUtils.isEmpty(str);
C0164n0 c0164n0 = (C0164n0) ((Cp.c) this).b;
if (!isEmpty) {
L8.o0.l(str);
if (str.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$")) {
return true;
}
if (TextUtils.isEmpty(c0164n0.b)) {
V zzj = zzj();
zzj.i.h("Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id", V.O1(str));
}
return false;
}
if (TextUtils.isEmpty(str2)) {
if (TextUtils.isEmpty(c0164n0.b)) {
zzj().i.g("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
}
return false;
}
L8.o0.l(str2);
if (str2.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$")) {
return true;
}
V zzj2 = zzj();
zzj2.i.h("Invalid admob_app_id. Analytics disabled.", V.O1(str2));
return false;
}
public final boolean z2(String str, String[] strArr, String[] strArr2, String str2) {
if (str2 == null) {
zzj().i.h("Name is required and can't be null. Type", str);
return false;
}
String[] strArr3 = j;
for (int i = 0; i < 3; i++) {
if (str2.startsWith(strArr3[i])) {
zzj().i.f(str, "Name starts with reserved prefix. Type, name", str2);
return false;
}
}
if (strArr == null || !y2(str2, strArr)) {
return true;
}
if (strArr2 != null && y2(str2, strArr2)) {
return true;
}
zzj().i.f(str, "Name is reserved. Type, name", str2);
return false;
}
}