正在查看: Baubap v3.9.7 应用的 s7.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Baubap v3.9.7 应用的 s7.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package bw;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
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 com.braze.Constants;
import com.google.android.gms.internal.measurement.zzcv;
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.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import javax.security.auth.x500.X500Principal;
public final class s7 extends g5 {
public static final String[] k = {"firebase_", "google_", "ga_"};
public static final String[] l = {"_err"};
public SecureRandom e;
public final AtomicLong f;
public int g;
public x8.d h;
public Boolean i;
public Integer j;
public s7(a5 a5Var) {
super(a5Var);
this.j = null;
this.f = new AtomicLong(0L);
}
public static boolean C0(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 E0(String str) {
String str2 = (String) w.a0.a(null);
return str2.equals("*") || Arrays.asList(str2.split(",")).contains(str);
}
public static boolean H0(String str) {
return !TextUtils.isEmpty(str) && str.startsWith("_");
}
public static long J(r rVar) {
long j = 0;
if (rVar == null) {
return 0L;
}
androidx.datastore.preferences.protobuf.v1 v1Var = new androidx.datastore.preferences.protobuf.v1(rVar);
while (v1Var.hasNext()) {
if (rVar.b.get((String) v1Var.next()) instanceof Parcelable[]) {
j += ((Parcelable[]) r3).length;
}
}
return j;
}
public static boolean J0(String str) {
f0.q.B(str);
return str.charAt(0) != '_' || str.equals("_ep");
}
public static long K(byte[] bArr) {
f0.q.E(bArr);
if (bArr.length <= 0) {
throw new IllegalStateException();
}
int i = 0;
long j = 0;
for (int length = bArr.length - 1; length >= 0 && length >= bArr.length - 8; length--) {
j += (bArr[length] & 255) << i;
i += 8;
}
return j;
}
public static int L0(String str) {
if ("_ldl".equals(str)) {
return 2048;
}
if ("_id".equals(str)) {
return 256;
}
return ("_lgclid".equals(str) || "_gbraid".equals(str)) ? 100 : 36;
}
public static Bundle O(List list) {
Bundle bundle = new Bundle();
if (list == null) {
return bundle;
}
Iterator it = list.iterator();
while (it.hasNext()) {
p7 p7Var = (p7) it.next();
String str = p7Var.f;
String str2 = p7Var.c;
if (str != null) {
bundle.putString(str2, str);
} else {
Long l2 = p7Var.e;
if (l2 != null) {
bundle.putLong(str2, l2.longValue());
} else {
Double d = p7Var.h;
if (d != null) {
bundle.putDouble(str2, d.doubleValue());
}
}
}
}
return bundle;
}
public static MessageDigest P0() {
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 String R(String str, int i, boolean z) {
if (str == null) {
return null;
}
if (str.codePointCount(0, str.length()) <= i) {
return str;
}
if (z) {
return a0.a.n(str.substring(0, str.offsetByCodePoints(0, i)), "...");
}
return null;
}
public static void S(int i, Bundle bundle, Object obj, String str) {
if (y0(i, bundle)) {
bundle.putString("_ev", R(str, 40, true));
if (obj != null) {
if ((obj instanceof String) || (obj instanceof CharSequence)) {
bundle.putLong("_el", String.valueOf(obj).length());
}
}
}
}
public static void X(l6 l6Var, Bundle bundle, boolean z) {
if (bundle == null || l6Var == null || (bundle.containsKey("_sc") && !z)) {
if (bundle != null && l6Var == null && z) {
bundle.remove("_sn");
bundle.remove("_sc");
bundle.remove("_si");
return;
}
return;
}
String str = l6Var.a;
if (str != null) {
bundle.putString("_sn", str);
} else {
bundle.remove("_sn");
}
String str2 = l6Var.b;
if (str2 != null) {
bundle.putString("_sc", str2);
} else {
bundle.remove("_sc");
}
bundle.putLong("_si", l6Var.c);
}
public static void Y(r7 r7Var, String str, int i, String str2, String str3, int i2) {
Bundle bundle = new Bundle();
y0(i, bundle);
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {
bundle.putString(str2, str3);
}
if (i == 6 || i == 7 || i == 2) {
bundle.putLong("_el", i2);
}
r7Var.b(str, "_err", bundle);
}
public static boolean j0(Context context) {
ActivityInfo receiverInfo;
f0.q.E(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 k0(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 l0(Object obj) {
return (obj instanceof Parcelable[]) || (obj instanceof ArrayList) || (obj instanceof Bundle);
}
public static boolean o0(String str, String str2, String str3, String str4) {
boolean isEmpty = TextUtils.isEmpty(str);
boolean isEmpty2 = TextUtils.isEmpty(str2);
if (!isEmpty && !isEmpty2) {
f0.q.E(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 p0(String str, String[] strArr) {
f0.q.E(strArr);
for (String str2 : strArr) {
if (Objects.equals(str, str2)) {
return true;
}
}
return false;
}
public static byte[] r0(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 t0(Context context) {
f0.q.E(context);
return Build.VERSION.SDK_INT >= 24 ? C0(context, "com.google.android.gms.measurement.AppMeasurementJobService") : C0(context, "com.google.android.gms.measurement.AppMeasurementService");
}
public static ArrayList x0(List list) {
if (list == null) {
return new ArrayList(0);
}
ArrayList arrayList = new ArrayList(list.size());
Iterator it = list.iterator();
while (it.hasNext()) {
e eVar = (e) it.next();
Bundle bundle = new Bundle();
bundle.putString("app_id", eVar.b);
bundle.putString("origin", eVar.c);
bundle.putLong("creation_timestamp", eVar.e);
bundle.putString("name", eVar.d.c);
Object o = eVar.d.o();
f0.q.E(o);
androidx.camera.extensions.internal.sessionprocessor.f.O(bundle, o);
bundle.putBoolean("active", eVar.f);
String str = eVar.g;
if (str != null) {
bundle.putString("trigger_event_name", str);
}
u uVar = eVar.h;
if (uVar != null) {
bundle.putString("timed_out_event_name", uVar.b);
r rVar = uVar.c;
if (rVar != null) {
bundle.putBundle("timed_out_event_params", rVar.q());
}
}
bundle.putLong("trigger_timeout", eVar.i);
u uVar2 = eVar.j;
if (uVar2 != null) {
bundle.putString("triggered_event_name", uVar2.b);
r rVar2 = uVar2.c;
if (rVar2 != null) {
bundle.putBundle("triggered_event_params", rVar2.q());
}
}
bundle.putLong("triggered_timestamp", eVar.d.d);
bundle.putLong("time_to_live", eVar.k);
u uVar3 = eVar.l;
if (uVar3 != null) {
bundle.putString("expired_event_name", uVar3.b);
r rVar3 = uVar3.c;
if (rVar3 != null) {
bundle.putBundle("expired_event_params", rVar3.q());
}
}
arrayList.add(bundle);
}
return arrayList;
}
public static boolean y0(int i, Bundle bundle) {
if (bundle == null || bundle.getLong("_err") != 0) {
return false;
}
bundle.putLong("_err", i);
return true;
}
public final boolean A0(String str, String str2) {
if (str2 == null) {
zzj().j.c("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
zzj().j.c("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt) && codePointAt != 95) {
zzj().j.d("Name must start with a letter or _ (underscore). Type, name", str, 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().j.d("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
public final Object B0(Object obj, String str) {
return "_ldl".equals(str) ? Q(L0(str), obj, true, false) : Q(L0(str), obj, false, false);
}
public final boolean D0(String str, String str2) {
if (str2 == null) {
zzj().j.c("Name is required and can't be null. Type", str);
return false;
}
if (str2.length() == 0) {
zzj().j.c("Name is required and can't be empty. Type", str);
return false;
}
int codePointAt = str2.codePointAt(0);
if (!Character.isLetter(codePointAt)) {
zzj().j.d("Name must start with a letter. Type, name", str, 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().j.d("Name must consist of letters, digits or _ (underscores). Type, name", str, str2);
return false;
}
charCount += Character.charCount(codePointAt2);
}
return true;
}
@Override
public final boolean F() {
return true;
}
public final boolean F0(String str) {
C();
if (rv.b.a(zza()).a.checkCallingOrSelfPermission(str) == 0) {
return true;
}
zzj().o.c("Permission not granted", str);
return false;
}
public final int G(Object obj, String str) {
return "_ldl".equals(str) ? n0("user property referrer", str, L0(str), obj) : n0("user property", str, L0(str), obj) ? 0 : 7;
}
public final int G0() {
if (this.j == null) {
com.google.android.gms.common.a aVar = com.google.android.gms.common.a.b;
Context zza = zza();
aVar.getClass();
AtomicBoolean atomicBoolean = iv.f.a;
int i = 0;
try {
i = zza.getPackageManager().getPackageInfo("com.google.android.gms", 0).versionCode;
} catch (PackageManager.NameNotFoundException unused) {
io.sentry.android.core.c.t("GooglePlayServicesUtil", "Google Play services is missing.");
}
this.j = Integer.valueOf(i / Constants.BRAZE_MINIMUM_NOTIFICATION_DURATION_MILLIS);
}
return this.j.intValue();
}
public final int H(String str) {
if (!A0("event", str)) {
return 2;
}
if (q0("event", l5.a, l5.b, str)) {
return !i0(40, "event", str) ? 2 : 0;
}
return 13;
}
public final int I(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: bw.s7.I(java.lang.String, java.lang.String, java.lang.Object, android.os.Bundle, java.util.List, boolean, boolean):int");
}
public final long I0() {
throw new UnsupportedOperationException("Method not decompiled: bw.s7.I0():long");
}
public final boolean K0(String str) {
List<ResolveInfo> queryIntentActivities;
return (TextUtils.isEmpty(str) || (queryIntentActivities = zza().getPackageManager().queryIntentActivities(new Intent("android.intent.action.VIEW", Uri.parse(str)), 0)) == null || queryIntentActivities.isEmpty()) ? false : true;
}
public final Bundle L(Uri uri, boolean z, 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 = z ? uri.getQueryParameter("sfmc_id") : null;
} 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) && (!z || 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("utm_term");
if (!TextUtils.isEmpty(queryParameter)) {
bundle.putString("term", queryParameter);
}
String queryParameter2 = uri.getQueryParameter("utm_content");
if (!TextUtils.isEmpty(queryParameter2)) {
bundle.putString("content", queryParameter2);
}
String queryParameter3 = uri.getQueryParameter("aclid");
if (!TextUtils.isEmpty(queryParameter3)) {
bundle.putString("aclid", queryParameter3);
}
String queryParameter4 = uri.getQueryParameter("cp1");
if (!TextUtils.isEmpty(queryParameter4)) {
bundle.putString("cp1", queryParameter4);
}
String queryParameter5 = uri.getQueryParameter("anid");
if (!TextUtils.isEmpty(queryParameter5)) {
bundle.putString("anid", queryParameter5);
}
if (!TextUtils.isEmpty(str6)) {
bundle.putString("campaign_id", str6);
}
if (!TextUtils.isEmpty(str7)) {
bundle.putString("dclid", str7);
}
String queryParameter6 = uri.getQueryParameter("utm_source_platform");
if (!TextUtils.isEmpty(queryParameter6)) {
bundle.putString("source_platform", queryParameter6);
}
String queryParameter7 = uri.getQueryParameter("utm_creative_format");
if (!TextUtils.isEmpty(queryParameter7)) {
bundle.putString("creative_format", queryParameter7);
}
String queryParameter8 = uri.getQueryParameter("utm_marketing_tactic");
if (!TextUtils.isEmpty(queryParameter8)) {
bundle.putString("marketing_tactic", queryParameter8);
}
if (!TextUtils.isEmpty(str8)) {
bundle.putString("srsltid", str8);
}
if (z && !TextUtils.isEmpty(str9)) {
bundle.putString(str10, str9);
}
return bundle;
} catch (UnsupportedOperationException e) {
zzj().k.c("Install referrer url isn't a hierarchical URI", e);
return null;
}
}
public final Bundle M(Bundle bundle) {
Bundle bundle2 = new Bundle();
if (bundle != null) {
for (String str : bundle.keySet()) {
Object w0 = w0(bundle.get(str), str);
if (w0 == null) {
c4 zzj = zzj();
zzj.m.c("Param value can't be null", z().f(str));
} else {
V(bundle2, str, w0);
}
}
}
return bundle2;
}
public final long M0() {
long andIncrement;
long j;
if (this.f.get() != 0) {
synchronized (this.f) {
this.f.compareAndSet(-1L, 1L);
andIncrement = this.f.getAndIncrement();
}
return andIncrement;
}
synchronized (this.f) {
long nanoTime = System.nanoTime();
((pv.b) zzb()).getClass();
long nextLong = new Random(nanoTime ^ System.currentTimeMillis()).nextLong();
int i = this.g + 1;
this.g = i;
j = nextLong + i;
}
return j;
}
public final android.os.Bundle N(java.lang.String r20, android.os.Bundle r21, java.util.List r22, boolean r23) {
throw new UnsupportedOperationException("Method not decompiled: bw.s7.N(java.lang.String, android.os.Bundle, java.util.List, boolean):android.os.Bundle");
}
public final x8.d N0() {
if (this.h == null) {
Context zza = zza();
xu.b.y(zza, "context");
StringBuilder sb = new StringBuilder("AdServicesInfo.version=");
int i = Build.VERSION.SDK_INT;
w8.a aVar = w8.a.a;
sb.append(i >= 30 ? aVar.a() : 0);
Log.d("MeasurementManager", sb.toString());
y8.b bVar = (i >= 30 ? aVar.a() : 0) >= 5 ? new y8.b(zza) : null;
this.h = bVar != null ? new x8.d(bVar) : null;
}
return this.h;
}
public final String O0() {
byte[] bArr = new byte[16];
Q0().nextBytes(bArr);
return String.format(Locale.US, "%032x", new BigInteger(1, bArr));
}
public final u P(String str, Bundle bundle, String str2, long j, boolean z) {
if (TextUtils.isEmpty(str)) {
return null;
}
if (H(str) != 0) {
zzj().h.c("Invalid conditional property event name", z().g(str));
throw new IllegalArgumentException();
}
Bundle bundle2 = bundle != null ? new Bundle(bundle) : new Bundle();
bundle2.putString("_o", str2);
Bundle N = N(str, bundle2, Collections.singletonList("_o"), true);
if (z) {
N = M(N);
}
f0.q.E(N);
return new u(str, new r(N), str2, j);
}
public final Object Q(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 R(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 M = M((Bundle) parcelable);
if (!M.isEmpty()) {
arrayList.add(M);
}
}
}
return arrayList.toArray(new Bundle[arrayList.size()]);
}
public final SecureRandom Q0() {
C();
if (this.e == null) {
this.e = new SecureRandom();
}
return this.e;
}
public final void T(Bundle bundle, long j) {
long j2 = bundle.getLong("_et");
if (j2 != 0) {
c4 zzj = zzj();
zzj.k.c("Params already contained engagement", Long.valueOf(j2));
}
bundle.putLong("_et", j + j2);
}
public final void U(Bundle bundle, Bundle bundle2) {
if (bundle2 == null) {
return;
}
for (String str : bundle2.keySet()) {
if (!bundle.containsKey(str)) {
B().V(bundle, str, bundle2.get(str));
}
}
}
public final void V(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().m.d("Not putting event parameter. Invalid value type. name, type", z().f(str), simpleName);
}
}
public final void W(f4 f4Var, int i) {
Iterator it = new TreeSet(f4Var.d.keySet()).iterator();
int i2 = 0;
while (it.hasNext()) {
String str = (String) it.next();
if (J0(str) && (i2 = i2 + 1) > i) {
String l2 = a0.a.l("Event can't contain more than ", i, " params");
c4 zzj = zzj();
String c = z().c(f4Var.a);
b4 z = z();
Bundle bundle = f4Var.d;
zzj.j.d(l2, c, z.a(bundle));
y0(5, bundle);
bundle.remove(str);
}
}
}
public final void Z(zzcv zzcvVar, int i) {
Bundle bundle = new Bundle();
bundle.putInt("r", i);
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning int value to wrapper", e);
}
}
public final void a0(zzcv zzcvVar, long j) {
Bundle bundle = new Bundle();
bundle.putLong("r", j);
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning long value to wrapper", e);
}
}
public final void b0(zzcv zzcvVar, Bundle bundle) {
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning bundle value to wrapper", e);
}
}
public final void c0(zzcv zzcvVar, ArrayList arrayList) {
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("r", arrayList);
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning bundle list to wrapper", e);
}
}
public final void d0(zzcv zzcvVar, boolean z) {
Bundle bundle = new Bundle();
bundle.putBoolean("r", z);
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning boolean value to wrapper", e);
}
}
public final void e0(zzcv zzcvVar, byte[] bArr) {
Bundle bundle = new Bundle();
bundle.putByteArray("r", bArr);
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning byte array to wrapper", e);
}
}
public final void f0(String str, zzcv zzcvVar) {
Bundle bundle = new Bundle();
bundle.putString("r", str);
try {
zzcvVar.zza(bundle);
} catch (RemoteException e) {
c4 c4Var = ((a5) ((e0.k0) this).c).j;
a5.d(c4Var);
c4Var.k.c("Error returning string value to wrapper", e);
}
}
public final void g0(java.lang.String r20, java.lang.String r21, android.os.Bundle r22, java.util.List r23, boolean r24) {
throw new UnsupportedOperationException("Method not decompiled: bw.s7.g0(java.lang.String, java.lang.String, android.os.Bundle, java.util.List, boolean):void");
}
public final void h0(Parcelable[] parcelableArr, int i, boolean z) {
f0.q.E(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 (J0(str) && !p0(str, l5.j) && (i2 = i2 + 1) > i) {
if (z) {
zzj().j.d(a0.a.l("Param can't contain more than ", i, " item-scoped custom parameters"), z().f(str), z().a(bundle));
y0(28, bundle);
} else {
zzj().j.d("Param cannot contain item-scoped custom parameters", z().f(str), z().a(bundle));
y0(23, bundle);
}
bundle.remove(str);
}
}
}
}
public final boolean i0(int i, String str, String str2) {
if (str2 == null) {
zzj().j.c("Name is required and can't be null. Type", str);
return false;
}
if (str2.codePointCount(0, str2.length()) <= i) {
return true;
}
c4 zzj = zzj();
zzj.j.e("Name is too long. Type, maximum supported length, name", str, Integer.valueOf(i), str2);
return false;
}
public final boolean m0(String str, String str2) {
if (!TextUtils.isEmpty(str)) {
f0.q.E(str);
if (str.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$")) {
return true;
}
if (TextUtils.isEmpty(((a5) ((e0.k0) this).c).c)) {
c4 zzj = zzj();
zzj.j.c("Invalid google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI. provided id", c4.G(str));
}
return false;
}
if (TextUtils.isEmpty(str2)) {
if (TextUtils.isEmpty(((a5) ((e0.k0) this).c).c)) {
zzj().j.b("Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI");
}
return false;
}
f0.q.E(str2);
if (str2.matches("^(1:\\d+:android:[a-f0-9]+|ca-app-pub-.*)$")) {
return true;
}
c4 zzj2 = zzj();
zzj2.j.c("Invalid admob_app_id. Analytics disabled.", c4.G(str2));
return false;
}
public final boolean n0(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)) {
if (!(obj instanceof String) && !(obj instanceof Character) && !(obj instanceof CharSequence)) {
return false;
}
String valueOf = String.valueOf(obj);
if (valueOf.codePointCount(0, valueOf.length()) > i) {
c4 zzj = zzj();
zzj.m.e("Value is too long; discarded. Value kind, name, value length", str, str2, Integer.valueOf(valueOf.length()));
return false;
}
}
return true;
}
public final boolean q0(String str, String[] strArr, String[] strArr2, String str2) {
if (str2 == null) {
zzj().j.c("Name is required and can't be null. Type", str);
return false;
}
String[] strArr3 = k;
for (int i = 0; i < 3; i++) {
if (str2.startsWith(strArr3[i])) {
zzj().j.d("Name starts with reserved prefix. Type, name", str, str2);
return false;
}
}
if (strArr == null || !p0(str2, strArr)) {
return true;
}
if (strArr2 != null && p0(str2, strArr2)) {
return true;
}
zzj().j.d("Name is reserved. Type, name", str, str2);
return false;
}
public final boolean s0(int i) {
Boolean bool = ((a5) ((e0.k0) this).c).m().g;
if (G0() < i / Constants.BRAZE_MINIMUM_NOTIFICATION_DURATION_MILLIS) {
return (bool == null || bool.booleanValue()) ? false : true;
}
return true;
}
public final void u0() {
C();
SecureRandom secureRandom = new SecureRandom();
long nextLong = secureRandom.nextLong();
if (nextLong == 0) {
nextLong = secureRandom.nextLong();
if (nextLong == 0) {
zzj().k.b("Utils falling back to Random for random id");
}
}
this.f.set(nextLong);
}
public final int v0(String str) {
if (!A0("user property", str)) {
return 6;
}
if (q0("user property", l5.e, null, str)) {
return !i0(24, "user property", str) ? 6 : 0;
}
return 15;
}
public final Object w0(Object obj, String str) {
if ("_ev".equals(str)) {
return Q(Math.max(y().E(null, false), 256), obj, true, true);
}
return Q(H0(str) ? Math.max(y().E(null, false), 256) : y().E(null, false), obj, false, true);
}
public final boolean z0(Context context, String str) {
Signature[] signatureArr;
X500Principal x500Principal = new X500Principal("CN=Android Debug,O=Android,C=US");
try {
PackageInfo b = rv.b.a(context).b(64, str);
if (b == null || (signatureArr = b.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().h.c("Package name not found", e);
return true;
} catch (CertificateException e2) {
zzj().h.c("Error obtaining certificate", e2);
return true;
}
}
}